mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
This commit is contained in:
parent
036fc7de24
commit
c0ec4486dc
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue