From cc4e6de5c4a907834de28ee13a0f6b5c8c68a882 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Sep 2023 01:10:17 +0200 Subject: [PATCH] Add comment --- Lib/test/libregrtest/run_workers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py index fc677bfb4c175bc..89cc50b7c158d27 100644 --- a/Lib/test/libregrtest/run_workers.py +++ b/Lib/test/libregrtest/run_workers.py @@ -218,6 +218,9 @@ def create_stdout(self, stack: contextlib.ExitStack) -> TextIO: # gh-94026: Write stdout+stderr to a tempfile as workaround for # non-blocking pipes on Emscripten with NodeJS. + # gh-109425: Use "backslashreplace" error handler: log corrupted + # stdout+stderr, instead of failing with a UnicodeDecodeError and not + # logging stdout+stderr at all. stdout_file = tempfile.TemporaryFile('w+', encoding=encoding, errors='backslashreplace')