-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-43843: libregrtest uses threading.excepthook #25400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-43843: libregrtest uses threading.excepthook #25400
Conversation
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.
I expected that many tests will start to fail when run using --fail-env-changed and it would be better for fix them first. Once CI jobs run on the PR will pass, I will use the buildbot label to test it on buildbots. |
libregrtest hook now logs the exception type
Travis CI:
|
libregrtest regrtest_unraisable_hook() and regrtest_threading_excepthook() now explicitly flush sys.stdout, sys.stderr and sys.__stderr__.
Azure Pipelines PR: test_logging and test_ssl failed on macOS. The logging issue is https://bugs.python.org/issue43842
The test_ssl failure is unrelated to this PR, I already saw in in other PRs. => I created https://bugs.python.org/issue43855 to track it
Azure Pipelines PR: test_asyncio failed on Windows PR win32, this one is unrelated by this PR and is known:
|
|
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.
https://bugs.python.org/issue43843