gh-140373: Correctly emit PY_UNWIND event when generator is closed (GH-140767)

This commit is contained in:
Mikhail Efimov
2025-10-31 13:09:22 +03:00
committed by GitHub
parent ac1ffd7785
commit d17f28fed5
6 changed files with 30 additions and 1 deletions

View File

@@ -2466,6 +2466,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,