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

(cherry picked from commit 22a1db378c)
This commit is contained in:
Miss Islington (bot) 2022-05-13 03:52:54 -07:00 committed by GitHub
parent c41667e71b
commit 2e8b2d0ee2
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()) {