]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135168)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 5 Jun 2025 09:42:38 +0000 (11:42 +0200)
committerGitHub <noreply@github.com>
Thu, 5 Jun 2025 09:42:38 +0000 (09:42 +0000)
commit285c69ea38f77949e7b8590e6d14bf23ad352561
treea831a5d77b7d53316a4841bac3bd594f8f7037e4
parent07921d416934fbe59514cffbc55c5e8fe09b762f
[3.14] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135168)

gh-135124: Change stdout errors in regrtest worker process (GH-135138)

Set sys.stdout encoder error handler to backslashreplace in regrtest
workers to avoid UnicodeEncodeError when printing a traceback
or any other non-encodable character.

Move the code from the Regrtest class to setup_process().

Call setup_process() earlier, before displaying regrtest headers.
(cherry picked from commit 3d396ab7591d544ac8bc1fb49615b4e867ca1c83)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/libregrtest/main.py
Lib/test/libregrtest/setup.py
Lib/test/test_regrtest.py