-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Our PyPy 3.7 builds that use encryption are failing:
[2023/04/06 20:41:32.893] Error in cpyext, CPython compatibility layer: [2023/04/06 20:41:32.893] PyThreadState_Swap() cannot be used to switch to another [2023/04/06 20:41:32.893] different PyThreadState right now [2023/04/06 20:41:32.893] RPython traceback: [2023/04/06 20:41:32.893] File "pypy_module_cpyext_2.c", line 26465, in unwrapper__StdObjSpaceConst_PyThreadStatePtr_sta [2023/04/06 20:41:32.893] File "pypy_module_cpyext_1.c", line 65525, in PyThreadState_Swap [2023/04/06 20:41:32.893] Fatal RPython error: AssertionError
Cryptography specifies that they require PyPy3 7.3.10+, but it cannot be expressed using
{python_requires}, so pip can't resolve it for us.
The solution is to modify the pymongocrypt dependencies to include:
["cryptography>2", "cryptography<40;platform_python_implementation=='PyPy' and implementation_version<'7.3.10'"]