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

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-11-30 13:35:14 +01:00 committed by GitHub
parent 58c0af9984
commit 52731c4e62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 30 additions and 1 deletions

View file

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