Skip to content

Commit

Permalink
Move pypy 7.3.14 stack compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
adiroiban committed Jan 14, 2024
1 parent 8236d03 commit 0af8bca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/twisted/internet/defer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@

log = Logger()

_STACK_LEVEL_INCOMPATIBLE = _PYPY and implementation.version < (7, 3, 14)


_T = TypeVar("_T")
Expand Down Expand Up @@ -2024,8 +2023,10 @@ def _inlineCallbacks(
appCodeTrace = traceback.tb_next
assert appCodeTrace is not None

if _STACK_LEVEL_INCOMPATIBLE:
# PyPy as of 3.7 and before 7.3.14 adds an extra frame.
_old_pypy_stack_compatibility = _PYPY and implementation.version < (7, 3, 14)
if _old_pypy_stack_compatibility:
# PyPy before 7.3.14 adds an extra frame.
# This code can be removed once we no longer need to support PyPy 7.3.13 or older.
appCodeTrace = appCodeTrace.tb_next
assert appCodeTrace is not None

Expand Down

0 comments on commit 0af8bca

Please sign in to comment.