File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 60
60
#endif
61
61
62
62
// Where does frame.f_lasti point when yielding from a generator?
63
- // It used to point at the YIELD, now it points at the RESUME.
63
+ // It used to point at the YIELD, in 3.13 it points at the RESUME,
64
+ // then it went back to the YIELD.
64
65
// https://github.com/python/cpython/issues/113728
65
- #define ENV_LASTI_IS_YIELD (PY_VERSION_HEX < 0x030D0000)
66
+ #define ENV_LASTI_IS_YIELD (( PY_VERSION_HEX & 0xFFFF0000) != 0x030D0000)
66
67
67
68
/* The values returned to indicate ok or error. */
68
69
#define RET_OK 0
Original file line number Diff line number Diff line change @@ -120,9 +120,10 @@ class PYBEHAVIOR:
120
120
pep669 = bool (getattr (sys , "monitoring" , None ))
121
121
122
122
# Where does frame.f_lasti point when yielding from a generator?
123
- # It used to point at the YIELD, now it points at the RESUME.
123
+ # It used to point at the YIELD, in 3.13 it points at the RESUME,
124
+ # then it went back to the YIELD.
124
125
# https://github.com/python/cpython/issues/113728
125
- lasti_is_yield = (PYVERSION < (3 , 13 ))
126
+ lasti_is_yield = (PYVERSION [: 2 ] != (3 , 13 ))
126
127
127
128
128
129
# Coverage.py specifics, about testing scenarios. See tests/testenv.py also.
You can’t perform that action at this time.
0 commit comments