[Python-checkins] bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)

methane webhook-mailer at python.org
Tue Apr 6 04:03:03 EDT 2021


https://github.com/python/cpython/commit/489c36920e94bfb4988b6f965bd0aafdfaff0d4f
commit: 489c36920e94bfb4988b6f965bd0aafdfaff0d4f
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: methane <songofacandy at gmail.com>
date: 2021-04-06T17:02:54+09:00
summary:

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

files:
M Tools/scripts/pdeps.py

diff --git a/Tools/scripts/pdeps.py b/Tools/scripts/pdeps.py
index 4e8e930948f1f..ab0040f48e2e7 100755
--- a/Tools/scripts/pdeps.py
+++ b/Tools/scripts/pdeps.py
@@ -64,7 +64,7 @@ def main():
 # 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]



More information about the Python-checkins mailing list