Skip to content

Commit

Permalink
[3.12] gh-105324: Fix tokenize module main function for stdin (GH-105325
Browse files Browse the repository at this point in the history
  • Loading branch information
miss-islington committed Jun 5, 2023
1 parent ab660e9 commit 3aa3be4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Lib/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ def error(message, filename=None, location=None):
else:
filename = "<stdin>"
tokens = _generate_tokens_from_c_tokenizer(
(x.encode('utf-8') for x in iter(sys.stdin.readline, "")
), "utf-8", extra_tokens=True)
sys.stdin.readline, extra_tokens=True)


# Output the tokenization
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix the main function of the :mod:`tokenize` module when reading from
``sys.stdin``. Patch by Pablo Galindo

0 comments on commit 3aa3be4

Please sign in to comment.