mirror of
https://github.com/python/cpython.git
synced 2024-11-23 09:54:58 +08:00
gh-117385: Remove unhooked events on sys.settrace (GH-117386)
This commit is contained in:
parent
a5eeb832c2
commit
0f99861332
@ -0,0 +1 @@
|
||||
Remove unhandled ``PY_MONITORING_EVENT_BRANCH`` and ``PY_MONITORING_EVENT_EXCEPTION_HANDLED`` events from :func:`sys.settrace`.
|
@ -599,10 +599,9 @@ _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg)
|
||||
(1 << PY_MONITORING_EVENT_PY_START) | (1 << PY_MONITORING_EVENT_PY_RESUME) |
|
||||
(1 << PY_MONITORING_EVENT_PY_RETURN) | (1 << PY_MONITORING_EVENT_PY_YIELD) |
|
||||
(1 << PY_MONITORING_EVENT_RAISE) | (1 << PY_MONITORING_EVENT_LINE) |
|
||||
(1 << PY_MONITORING_EVENT_JUMP) | (1 << PY_MONITORING_EVENT_BRANCH) |
|
||||
(1 << PY_MONITORING_EVENT_JUMP) |
|
||||
(1 << PY_MONITORING_EVENT_PY_UNWIND) | (1 << PY_MONITORING_EVENT_PY_THROW) |
|
||||
(1 << PY_MONITORING_EVENT_STOP_ITERATION) |
|
||||
(1 << PY_MONITORING_EVENT_EXCEPTION_HANDLED);
|
||||
(1 << PY_MONITORING_EVENT_STOP_ITERATION);
|
||||
|
||||
PyFrameObject* frame = PyEval_GetFrame();
|
||||
if (frame->f_trace_opcodes) {
|
||||
|
Loading…
Reference in New Issue
Block a user