GeezerVison is showing github.com — [WIP] gh-73858: Save and restore module warning registries in catch_warnings by segevfiner · Pull Request #8232 · python/cpython
Conversation
segevfiner
commented
Jul 10, 2018
•
edited by serhiy-storchaka
Loading
Uh oh!
There was an error while loading. Please reload this page.
This avoids catch_warnings wiping out all module warning registries due to calling _filters_mutated. Which causes all warnings recorded in those registries to be shown again.
I'm not sure if this is the right approach for this, so I'm submitting this incomplete in order to garner feedback, and for answers to the questions in TODO below.
TODO
- Should
onceregistry be saved and restored too?
- A better test? I'm not sure how to test this better since
catch_warnings is used for the warnings tests themselves.
- Consider the order that things are done in
catch_warnings.__enter__ and catch_warnings.__exit__, to cause the least disturbance due to threads (It's not thread safe anyhow...)
- Documentation & NEWS.d obviously
https://bugs.python.org/issue29672
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gerritholl, suic86, SiegeLordEx, jni, anmyachev, calgray, and btmills reacted with thumbs up emoji
This avoids catch_warnings wiping out all module warning registries due
to calling _filters_mutated. Which causes all warnings recorded in those
registries to be shown again.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…nings-registries-restore
|
Hi @segevfiner do you plan to continue working on this pull request? Or are you waiting for a review?
I ask because I also encountered this problem and I wonder if it can be solved in the near future.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Hi @segevfiner do you plan to continue working on this pull request? Or are you waiting for a review?
I ask because I also encountered this problem and I wonder if it can be solved in the near future.
It was waiting for a full review since a long time ago (2018...), and seems to have gone stale quite a bit by now. I can try to resolve the conflicts, but even then, I'm not sure any core maintainer will review this
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
but even then, I'm not sure any core maintainer will review this
I imagine this has a wide impact, we've gotten numerous issues raised in pandas. As the linked issue points out, one can hit this from the standard library too. I don't understand why it wouldn't be reviewed, but maybe there is some way we can drum up support?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
serhiy-storchaka
changed the title
[WIP] bpo-29672: Save and restore module warning registries in catch_warnings
[WIP] gh-73858: Save and restore module warning registries in catch_warnings
Aug 12, 2026
|
This PR is blocked on its author, has not been touched by a human in more than 2 years, and no longer merges cleanly. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer on gh-73858.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
ericsnowcurrently
Awaiting requested review from ericsnowcurrently
ericsnowcurrently will be requested when the pull request is marked ready for review
ericsnowcurrently is a code owner
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|