[Python-checkins] bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
miss-islington
webhook-mailer at python.org
Fri Oct 29 13:21:24 EDT 2021
https://github.com/python/cpython/commit/d8ca47c943c4ad396a9c70aff35bbbf4b1868876
commit: d8ca47c943c4ad396a9c70aff35bbbf4b1868876
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-10-29T10:21:15-07:00
summary:
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
(cherry picked from commit cdc7a5827754bec83970bb052d410d55f85b3fff)
Co-authored-by: Pablo Galindo Salgado <Pablogsal at gmail.com>
files:
M Parser/tokenizer.c
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 6563cdfd7cc60..519300f3731f0 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -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
More information about the Python-checkins
mailing list