summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-13 10:52:54 (GMT)
committerGitHub <noreply@github.com>2022-05-13 10:52:54 (GMT)
commit2e8b2d0ee2f8d0c53d2747d400b83c171732d3a9 (patch)
tree4fa4792578899ed499bbef3291edf2bf0cf0616d /Python
parentc41667e71b6f1b0c9581160ccd82026738c3a736 (diff)
downloadcpython-2e8b2d0ee2f8d0c53d2747d400b83c171732d3a9.zip
cpython-2e8b2d0ee2f8d0c53d2747d400b83c171732d3a9.tar.gz
cpython-2e8b2d0ee2f8d0c53d2747d400b83c171732d3a9.tar.bz2
GH-92236: Remove spurious "line" event when starting coroutine or generator. (GH-92722) (GH-92772)
(cherry picked from commit 22a1db378c5c381272362c5b2f68ac78a368e136)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index f6b07b4..c73218f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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()) {