]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-135124: Change stdout errors in regrtest worker process (#135138)
authorVictor Stinner <vstinner@python.org>
Thu, 5 Jun 2025 09:17:03 +0000 (11:17 +0200)
committerGitHub <noreply@github.com>
Thu, 5 Jun 2025 09:17:03 +0000 (11:17 +0200)
commit3d396ab7591d544ac8bc1fb49615b4e867ca1c83
treec71b2aefa67f497e334f35c15f594d5380f122a7
parent2e1544fd2b0cd46ba93fc51e3cdd47f4781d7499
gh-135124: Change stdout errors in regrtest worker process (#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.
Lib/test/libregrtest/main.py
Lib/test/libregrtest/setup.py
Lib/test/test_regrtest.py