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 dbe213de7e:
libregrtest no longer replaces sys.__stdout__, sys.__stderr__, and
stdout and stderr file descriptors.

Remove also a few unused imports in libregrtest.
This commit is contained in:
Victor Stinner 2021-10-13 14:08:18 +02:00 committed by GitHub
parent 380c440875
commit 7733307739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 82 deletions

View file

@ -1,7 +1,6 @@
import argparse
import os
import sys
from test import support
from test.support import os_helper