mirror of https://github.com/python/cpython
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
This commit is contained in:
parent
036fc7de24
commit
c0ec4486dc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue