]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Thu, 28 Oct 2021 17:06:15 +0000 (18:06 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 17:06:15 +0000 (18:06 +0100)
Parser/tokenizer.c

index 4329cdd226e9c6db7a3ed5aa056bca1d77b67867..8a19458ec72f460b2807d408d3180e1bbbf94815 100644 (file)
@@ -1048,7 +1048,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