Skip to content

Commit c0ec448

Browse files
authored
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
1 parent 036fc7d commit c0ec448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/lib2to3/pgen2/pgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ParserGenerator(object):
1212
def __init__(self, filename, stream=None):
1313
close_stream = None
1414
if stream is None:
15-
stream = open(filename)
15+
stream = open(filename, encoding="utf-8")
1616
close_stream = stream.close
1717
self.filename = filename
1818
self.stream = stream

0 commit comments

Comments
 (0)