diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-01 23:59:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 23:59:15 (GMT) |
commit | c0ec4486dc7dd70fea39d1473ac9a9ac568378fe (patch) | |
tree | c289766e239ffe58e4f4625db0edf15fdb019ed2 /Lib | |
parent | 036fc7de24cc961d65b60fba266104009feb2797 (diff) | |
download | cpython-c0ec4486dc7dd70fea39d1473ac9a9ac568378fe.zip cpython-c0ec4486dc7dd70fea39d1473ac9a9ac568378fe.tar.gz cpython-c0ec4486dc7dd70fea39d1473ac9a9ac568378fe.tar.bz2 |
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/lib2to3/pgen2/pgen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py index b0cbd16..7abd5ce 100644 --- a/Lib/lib2to3/pgen2/pgen.py +++ b/Lib/lib2to3/pgen2/pgen.py @@ -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 |