PyPy3.9: RecursionError in lxml since lib_pypy/_functools.py removal
With PyPy3.9 7.3.10, running lxml
test suite results in:
Traceback (most recent call last):
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2/test.py", line 615, in <module>
exitcode = main(sys.argv)
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2/test.py", line 552, in main
test_cases = get_test_cases(test_files, cfg, cov=cov)
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2/test.py", line 259, in get_test_cases
module = import_module(file, cfg, cov=cov)
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2/test.py", line 200, in import_module
mod = __import__(modname)
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2-pypy3/test/usr/lib/pypy3.9/site-packages/lxml/tests/test_builder.py", line 13, in <module>
from lxml.html.builder import E as HE
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2-pypy3/test/usr/lib/pypy3.9/site-packages/lxml/html/builder.py", line 38, in <module>
A = E.a #: anchor
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2-pypy3/test/usr/lib/pypy3.9/site-packages/lxml/builder.py", line 229, in __getattr__
return partial(self, tag)
File "/usr/lib/pypy3.9/functools.py", line 286, in __new__
if hasattr(func, "func") and isinstance(func, partial):
[...]
File "/tmp/portage/dev-python/lxml-4.9.2/work/lxml-lxml-4.9.2-pypy3/test/usr/lib/pypy3.9/site-packages/lxml/builder.py", line 229, in __getattr__
return partial(self, tag)
RecursionError: maximum recursion depth exceeded
I've been able to confirm that it's caused by:
commit c5a1d0882e5f7225f8ba27b97b20ba0831c7440e
Author: Matti Picus <matti.picus@gmail.com>
Date: Thu Dec 1 15:08:45 2022 +0200
remove redundnat lib_pypy/_functools.py and re-sync test_functools.py (issue 3861)
lib-python/3/test/test_functools.py | 177 ------------------------------------
lib_pypy/_functools.py | 152 -------------------------------
2 files changed, 329 deletions(-)
delete mode 100644 lib_pypy/_functools.py