bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)

This commit is contained in:
Inada Naoki 2021-04-06 17:02:54 +09:00 committed by GitHub
parent 1d023e374c
commit 489c36920e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ m_from = re.compile('^[ \t]*import[ \t]+([^#]+)')
# Collect data from one file
#
def process(filename, table):
with open(filename) as fp:
with open(filename, encoding='utf-8') as fp:
mod = os.path.basename(filename)
if mod[-3:] == '.py':
mod = mod[:-3]