Skip to content

Commit 401980b

Browse files
committed
Use pre-3.10 serialization code on PyPy3.10
The new serialization code for Python 3.10+ does not seem to work on PyPy3.10 7.3.13, as it causes: ValueError: no signature found for builtin type <class 'code'> Switch back to the old code if PyPy is used, at least for the time being. With this change, the test suite passes on PyPy3.10. Fixes #845
1 parent 44dab1c commit 401980b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipyparallel/serialize/codeutil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def code_ctor(*args):
2727
}
2828
# pass every supported arg to the code constructor
2929
# this should be more forward-compatible
30-
if sys.version_info >= (3, 10):
30+
# (broken on pypy: https://github.com/ipython/ipyparallel/issues/845)
31+
if sys.version_info >= (3, 10) and not hasattr(sys, "pypy_version_info"):
3132
_code_attr_names = tuple(
3233
_code_attr_map.get(name, name)
3334
for name, param in inspect.signature(types.CodeType).parameters.items()

0 commit comments

Comments
 (0)