]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 Oct 2021 17:21:15 +0000 (10:21 -0700)
committerGitHub <noreply@github.com>
Fri, 29 Oct 2021 17:21:15 +0000 (10:21 -0700)
(cherry picked from commit cdc7a5827754bec83970bb052d410d55f85b3fff)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Parser/tokenizer.c

index 6563cdfd7cc607857933f11666ec7b51304ea77e..519300f3731f017afc93f2b1ff66aebdda920533 100644 (file)
@@ -1047,7 +1047,7 @@ tok_nextc(struct tok_state *tok)
 #if defined(Py_DEBUG)
         if (Py_DebugFlag) {
             fprintf(stderr, "line[%d] = ", tok->lineno);
-            print_escape(stdout, tok->cur, tok->inp - tok->cur);
+            print_escape(stderr, tok->cur, tok->inp - tok->cur);
             fprintf(stderr, "  tok->done = %d\n", tok->done);
         }
 #endif