-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-31234: threading_cleanup() now warns immediately #3138
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
Conversation
Lib/test/support/__init__.py
Outdated
|
||
if not count: | ||
environment_altered = True | ||
print("Warning -- threading_cleanup() detected %s leaked threads " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the "leak" terminology here. I think the previous message was better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I reverted to the original message.
I rebased my change to get other fixes for dangling threads and processes. |
test_ftplib and test_poplib should have been fixed by PR #3540. I rebased my PR one more time, only test_ssl should fail. Sadly, I'm unable to reproduce the test_ssl failure. |
I tag again the PR as [WIP] until the test_ssl issue is fixed. I rebased the PR to get the second test_ftplib fix (PR #3544). |
support.threading_cleanup() waits for 1 second before emitting a warning if there are threads running in the background. With this change, it now emits the warning immediately, to be able to catch bugs more easily.
support.threading_cleanup() waits for 1 second before emitting a
warning if there are threads running in the background. With this
change, it now emits the warning immediately, to be able to catch
bugs more easily.
https://bugs.python.org/issue31234