[Python-checkins] Fix EncodingWarning in libregrtest (GH-31654)
methane
webhook-mailer at python.org
Thu Mar 3 02:20:05 EST 2022
https://github.com/python/cpython/commit/3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532
commit: 3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532
branch: main
author: Inada Naoki <songofacandy at gmail.com>
committer: methane <songofacandy at gmail.com>
date: 2022-03-03T16:19:56+09:00
summary:
Fix EncodingWarning in libregrtest (GH-31654)
files:
M Lib/test/libregrtest/refleak.py
diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py
index 1069e2da008ff..a0538cbb3c377 100644
--- a/Lib/test/libregrtest/refleak.py
+++ b/Lib/test/libregrtest/refleak.py
@@ -142,7 +142,7 @@ def check_fd_deltas(deltas):
msg = '%s leaked %s %s, sum=%s' % (
test_name, deltas, item_name, sum(deltas))
print(msg, file=sys.stderr, flush=True)
- with open(fname, "a") as refrep:
+ with open(fname, "a", encoding="utf-8") as refrep:
print(msg, file=refrep)
refrep.flush()
failed = True
More information about the Python-checkins
mailing list