summaryrefslogtreecommitdiffstats
path: root/Lib/_sitebuiltins.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-06 02:18:41 (GMT)
committerGitHub <noreply@github.com>2021-04-06 02:18:41 (GMT)
commitfb78692f2ad5ee4747f13a73943fbf134b637669 (patch)
treebeb9f1abe584a74f281955ead6541cdeeeaa17a8 /Lib/_sitebuiltins.py
parentf84d5a113680c5a6aaaf9130aed7a34d611748ff (diff)
downloadcpython-fb78692f2ad5ee4747f13a73943fbf134b637669.zip
cpython-fb78692f2ad5ee4747f13a73943fbf134b637669.tar.gz
cpython-fb78692f2ad5ee4747f13a73943fbf134b637669.tar.bz2
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)
* Fix _sitebuiltins * Fix test_inspect * Fix test_interpreters * Fix test_io * Fix test_iter * Fix test_json * Fix test_linecache * Fix test_lltrace * Fix test_logging * Fix logging
Diffstat (limited to 'Lib/_sitebuiltins.py')
-rw-r--r--Lib/_sitebuiltins.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_sitebuiltins.py b/Lib/_sitebuiltins.py
index c29cf4b..c66269a 100644
--- a/Lib/_sitebuiltins.py
+++ b/Lib/_sitebuiltins.py
@@ -47,7 +47,7 @@ class _Printer(object):
data = None
for filename in self.__filenames:
try:
- with open(filename, "r") as fp:
+ with open(filename, encoding='utf-8') as fp:
data = fp.read()
break
except OSError: