-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
warnings.catch_warnings is not thread-safe #50896
Comments
warnings.catch_warnings is a context manager supposed to save and But it does so in a completely thread-unsafe way, by replacing the I don't know how to fix this, other than using locks (that could block |
Any function whose purpose is to mutate global (non thread-local) state |
Document that warnings.catch_warnings is not thread safe. |
Added a warning to 2.x trunk in r79607, and Gabriel's doc change in r79608. This thread-unsafety seems specialized and rarely of great importance, so I used the note:: directive, not warning::. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: