[3.13] gh-140373: Correctly emit PY_UNWIND event when generator is closed (GH-140767) (#140821)

This commit is contained in:
Mikhail Efimov 2025-12-20 17:21:11 +03:00 committed by GitHub
parent 5d82520e38
commit 4504ff89d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 32 additions and 3 deletions

View file

@ -2272,6 +2272,10 @@ monitor_unwind(PyThreadState *tstate,
do_monitor_exc(tstate, frame, instr, PY_MONITORING_EVENT_PY_UNWIND);
}
bool
_PyEval_NoToolsForUnwind(PyThreadState *tstate) {
return no_tools_for_global_event(tstate, PY_MONITORING_EVENT_PY_UNWIND);
}
static int
monitor_handled(PyThreadState *tstate,