GH-92236: Remove spurious "line" event when starting coroutine or generator. (GH-92722)

This commit is contained in:
Mark Shannon 2022-05-13 11:24:45 +01:00 committed by GitHub
parent db388df1d9
commit 22a1db378c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 107 additions and 0 deletions

View file

@ -5680,6 +5680,12 @@ handle_eval_breaker:
TRACE_FUNCTION_ENTRY();
DTRACE_FUNCTION_ENTRY();
break;
case POP_TOP:
if (_Py_OPCODE(next_instr[-1]) == RETURN_GENERATOR) {
/* Frame not fully initialized */
break;
}
/* fall through */
default:
/* line-by-line tracing support */
if (PyDTrace_LINE_ENABLED()) {