File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
1919PYBIND11_NAMESPACE_BEGIN(detail)
2020
2121inline void ensure_builtins_in_globals(object &global) {
22- #if PY_VERSION_HEX < 0x03080000
22+ #if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x03080000
2323 // Running exec and eval on Python 2 and 3 adds `builtins` module under
2424 // `__builtins__` key to globals if not yet present.
2525 // Python 3.8 made PyRun_String behave similarly. Let's also do that for
26- // older versions, for consistency.
26+ // older versions, for consistency. This was missing from PyPy3.8 7.3.7.
2727 if (!global.contains (" __builtins__" ))
2828 global[" __builtins__" ] = module_::import (PYBIND11_BUILTINS_MODULE);
2929 #else
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ numpy==1.16.6; python_version<"3.6" and sys_platform!="win32" and platform_pytho
22numpy == 1.19.0 ; platform_python_implementation == "PyPy" and sys_platform=="linux" and python_version=="3.6"
33numpy == 1.20.0 ; platform_python_implementation == "PyPy" and sys_platform=="linux" and python_version=="3.7"
44numpy == 1.19.3 ; platform_python_implementation != "PyPy" and python_version=="3.6"
5- numpy == 1.21.3 ; platform_python_implementation != "PyPy" and python_version>="3.7"
5+ numpy == 1.21.3 ; platform_python_implementation != "PyPy" and python_version>="3.7" and python_version< "3.11"
66py @ git+https://github.com/pytest-dev/py; python_version>="3.11"
77pytest == 4.6.9 ; python_version < "3.5"
88pytest == 6.1.2 ; python_version == "3.5"
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def test_to_python():
6262 assert cstats .alive () == 1
6363 del mat2 # holds a mat reference
6464 pytest .gc_collect ()
65+ pytest .gc_collect () # Needed for PyPy
6566 assert cstats .alive () == 0
6667 assert cstats .values () == ["5x4 matrix" ]
6768 assert cstats .copy_constructions == 0
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ def cant_convert(v):
299299 assert noconvert (7 ) == 7
300300 cant_convert (3.14159 )
301301 # TODO: Avoid DeprecationWarning in `PyLong_AsLong` (and similar)
302- if (3 , 8 ) <= env .PY < (3 , 10 ):
302+ if (3 , 8 ) <= env .PY < (3 , 10 ) and env . CPYTHON :
303303 with env .deprecated_call ():
304304 assert convert (Int ()) == 42
305305 else :
@@ -334,7 +334,7 @@ def require_implicit(v):
334334
335335 # The implicit conversion from np.float32 is undesirable but currently accepted.
336336 # TODO: Avoid DeprecationWarning in `PyLong_AsLong` (and similar)
337- if (3 , 8 ) <= env .PY < (3 , 10 ):
337+ if (3 , 8 ) <= env .PY < (3 , 10 ) and env . CPYTHON :
338338 with env .deprecated_call ():
339339 assert convert (np .float32 (3.14159 )) == 3
340340 else :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if("${PYTHON_MODULE_EXTENSION}" MATCHES "pypy" OR "${Python_INTERPRETER_ID}" STR
77 return ()
88endif ()
99
10- find_package (Catch 2.13.2 )
10+ find_package (Catch 2.13.7 )
1111
1212if (CATCH_FOUND)
1313 message (STATUS "Building interpreter tests using Catch v${CATCH_VERSION} " )
You can’t perform that action at this time.
0 commit comments