Title: [WIP] bpo-29672: Save and restore module warning registries in catch_warnings by segevfiner · Pull Request #8232 · python/cpython · GitHub
Open Graph Title: [WIP] bpo-29672: Save and restore module warning registries in catch_warnings by segevfiner · Pull Request #8232 · python/cpython
X Title: [WIP] bpo-29672: Save and restore module warning registries in catch_warnings by segevfiner · Pull Request #8232 · python/cpython
Description: 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
Open Graph Description: 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 th...
X Description: 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 i...
Opengraph URL: https://github.com/python/cpython/pull/8232
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3016b8ac-01d4-62dd-4e6f-93529b8c8089 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A6A6:34E738:A369F0:D7D93A:696B5542 |
| html-safe-nonce | b7379f1973a9aafef4dc2897f36ecf51532fe62f153bb8854f4e53740c52472b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkE2OjM0RTczODpBMzY5RjA6RDdEOTNBOjY5NkI1NTQyIiwidmlzaXRvcl9pZCI6IjQ5NjA3NDA0NjQ3NjgyNzU3NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c57bfbe82ae616f352eab160b69479e3c765c13e1f47911f3eaf6770653f794f |
| hovercard-subject-tag | pull_request:200526117 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/8232/files |
| twitter:image | https://avatars.githubusercontent.com/u/24731903?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/24731903?s=400&v=4 |
| og:image:alt | 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 th... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width