bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)

(cherry picked from commit cdc7a58277)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-10-29 10:21:15 -07:00 committed by GitHub
parent 191a93905a
commit d8ca47c943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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