]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)
authorInada Naoki <songofacandy@gmail.com>
Tue, 6 Apr 2021 08:02:54 +0000 (17:02 +0900)
committerGitHub <noreply@github.com>
Tue, 6 Apr 2021 08:02:54 +0000 (17:02 +0900)
Tools/scripts/pdeps.py

index 4e8e930948f1ff433307f5400fa2298a021ae374..ab0040f48e2e794c7e64ab7203522d487f1e18b2 100755 (executable)
@@ -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]