]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135169)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 5 Jun 2025 10:11:26 +0000 (12:11 +0200)
committerGitHub <noreply@github.com>
Thu, 5 Jun 2025 10:11:26 +0000 (10:11 +0000)
commit5a69d4fe004d5d154aecb1d6dc4f8c66bdb04c4f
treecb18d438da2f0ef33eb6305f784ee4c88fcd8e07
parentfd39aa3a7fea89c98c01756193632c197dd2d337
[3.13] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135169)

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