◐ Shell
clean mode source ↗

bpo-43843: libregrtest uses threading.excepthook by vstinner · Pull Request #25400 · python/cpython

test.libregrtest now marks a test as ENV_CHANGED (altered the
execution environment) if a thread raises an exception but does not
catch it. It sets a hook on threading.excepthook. Use
--fail-env-changed option to mark the test as failed.
libregrtest hook now logs the exception type
libregrtest regrtest_unraisable_hook() and
regrtest_threading_excepthook() now explicitly flush sys.stdout,
sys.stderr and sys.__stderr__.

@vstinner vstinner deleted the regrtest_threading_excepthook branch

April 16, 2021 12:33