Skip to content

Commit

Permalink
Fix(ImportHooks): Fix another RecursionError under PyPy3
Browse files Browse the repository at this point in the history
  • Loading branch information
phdru committed Jul 29, 2024
1 parent b75f651 commit b15300b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cheetah/ImportManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,10 @@ def doimport(self, nm, parentnm, fqname):
try:
mod = director.getmod(nm)
except RecursionError:
mod = __oldimport__(nm) # noqa: F821 undefined name
try:
mod = __oldimport__(nm) # noqa: F821 undefined name
except RecursionError:
pass
if mod:
break
if mod:
Expand Down
2 changes: 2 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Bug fixes:
- Fixed mapping test in ``NameMapper.py``:
Python 3.13 brough a new mapping type ``FrameLocalsProxy``.

- Fixed another ``RecursionError`` in ``ImportHooks`` under PyPy3.

Tests:

- tox: Run tests under Python 3.13.
Expand Down

0 comments on commit b15300b

Please sign in to comment.