summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-01 23:59:15 (GMT)
committerGitHub <noreply@github.com>2021-04-01 23:59:15 (GMT)
commitc0ec4486dc7dd70fea39d1473ac9a9ac568378fe (patch)
treec289766e239ffe58e4f4625db0edf15fdb019ed2 /Lib/lib2to3
parent036fc7de24cc961d65b60fba266104009feb2797 (diff)
downloadcpython-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/lib2to3')
-rw-r--r--Lib/lib2to3/pgen2/pgen.py2
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