[3.13] GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122419)

(cherry picked from commit 15d4cd0967)
This commit is contained in:
Brandt Bucher 2024-07-29 14:51:19 -07:00 committed by GitHub
parent 56340ee8b1
commit 55554fd215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 12 deletions

View file

@ -2787,7 +2787,7 @@
if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) {
goto error;
}
monitor_raise(tstate, frame, this_instr);
_PyEval_MonitorRaise(tstate, frame, this_instr);
_PyErr_Clear(tstate);
}
/* iterator ended normally */
@ -3307,7 +3307,7 @@
if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) {
goto error;
}
monitor_raise(tstate, frame, this_instr);
_PyEval_MonitorRaise(tstate, frame, this_instr);
_PyErr_Clear(tstate);
}
/* iterator ended normally */
@ -5317,7 +5317,7 @@
if (retval == NULL) {
if (_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)
) {
monitor_raise(tstate, frame, this_instr);
_PyEval_MonitorRaise(tstate, frame, this_instr);
}
if (_PyGen_FetchStopIterationValue(&retval) == 0) {
assert(retval != NULL);