summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2022-03-03 07:19:56 (GMT)
committerGitHub <noreply@github.com>2022-03-03 07:19:56 (GMT)
commit3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532 (patch)
tree0c519b0c31a96869463d7bac5776fa791ae80a77
parent81d968b7c30d5b41f3f28b297b7ee5345d569509 (diff)
downloadcpython-3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532.zip
cpython-3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532.tar.gz
cpython-3c4abfab0d3e2a3b1e626a5eb185ad1f5436b532.tar.bz2
Fix EncodingWarning in libregrtest (GH-31654)
-rw-r--r--Lib/test/libregrtest/refleak.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py
index 1069e2d..a0538cb 100644
--- a/Lib/test/libregrtest/refleak.py
+++ b/Lib/test/libregrtest/refleak.py
@@ -142,7 +142,7 @@ def dash_R(ns, test_name, test_func):
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