cpython: d7a64e095930 (original) (raw)

--- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -550,16 +550,7 @@ def main(tests=None, testdir=None, verbo from subprocess import Popen, PIPE debug_output_pat = re.compile(r"[\d+ refs]$") output = Queue()

@@ -567,10 +558,16 @@ def main(tests=None, testdir=None, verbo try: while True: try:

@@ -622,7 +619,7 @@ def main(tests=None, testdir=None, verbo test_index += 1 except KeyboardInterrupt: interrupted = True

+

+

+

+ def replace_stdout(): """Set stdout encoder error handler to backslashreplace (as stderr error handler) to avoid UnicodeEncodeError when printing a traceback"""

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -378,6 +378,9 @@ Extension Modules Tests ----- +- Issue #15320: Make iterating the list of tests thread-safe when running