bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718) (GH-21827)

regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.

(cherry picked from commit 701b63894fdb75b12865b9be6261ce4913da76f5)
2 files changed