Skip to content

Commit

Permalink
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane authored Apr 1, 2021
1 parent 036fc7d commit c0ec448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/lib2to3/pgen2/pgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ParserGenerator(object):
def __init__(self, filename, stream=None):
close_stream = None
if stream is None:
stream = open(filename)
stream = open(filename, encoding="utf-8")
close_stream = stream.close
self.filename = filename
self.stream = stream
Expand Down

0 comments on commit c0ec448

Please sign in to comment.