https://github.com/python/cpython/commit/e9025039801ed9be48b825e6fff614ef3bc7dafb
commit: e9025039801ed9be48b825e6fff614ef3bc7dafb
branch: 3.12
author: Steve Dower <[email protected]>
committer: zooba <[email protected]>
date: 2024-05-29T20:51:30Z
summary:
gh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)
files:
M Lib/test/test_launcher.py
diff --git a/Lib/test/test_launcher.py b/Lib/test/test_launcher.py
index 7dd0b67ea0b3dc..b701ceb86406b2 100644
--- a/Lib/test/test_launcher.py
+++ b/Lib/test/test_launcher.py
@@ -232,7 +232,7 @@ def run_py(self, args, env=None, allow_fail=False,
expect_returncode=0, argv=Non
p.stdin.close()
p.wait(10)
out = p.stdout.read().decode("utf-8", "replace")
- err = p.stderr.read().decode("ascii", "replace")
+ err = p.stderr.read().decode("ascii", "replace").replace("\uFFFD",
"?")
if p.returncode != expect_returncode and support.verbose and not
allow_fail:
print("++ COMMAND ++")
print([self.py_exe, *args])
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]