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,4 +1,3 @@
import collections
import faulthandler
import json
import os