]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915)
authorVictor Stinner <vstinner@python.org>
Wed, 13 Oct 2021 12:08:18 +0000 (14:08 +0200)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 12:08:18 +0000 (14:08 +0200)
commit773330773968f211c77abc7b5b525faa7b3c35a2
tree227525b1ec3989adde6ab6e630b5e4f87471d5a1
parent380c44087505d0d560f97e325028f27393551164
bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915)

support.print_warning() now stores the original value of
sys.__stderr__ and uses it to log warnings. libregrtest uses the same
stream to log unraisable exceptions and uncaught threading
exceptions.

Partially revert commit dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2:
libregrtest no longer replaces sys.__stdout__, sys.__stderr__, and
stdout and stderr file descriptors.

Remove also a few unused imports in libregrtest.
Lib/test/libregrtest/cmdline.py
Lib/test/libregrtest/refleak.py
Lib/test/libregrtest/runtest.py
Lib/test/libregrtest/runtest_mp.py
Lib/test/libregrtest/utils.py
Lib/test/support/__init__.py
Lib/test/test_support.py