Title: Replace warnings.warn with cbook._warn_external or logging.warning by hershen · Pull Request #12006 · matplotlib/matplotlib · GitHub
Open Graph Title: Replace warnings.warn with cbook._warn_external or logging.warning by hershen · Pull Request #12006 · matplotlib/matplotlib
X Title: Replace warnings.warn with cbook._warn_external or logging.warning by hershen · Pull Request #12006 · matplotlib/matplotlib
Description: PR Summary Fix issue #10643 Added stacklevel=2 to all warnings.warn calls that didn't have stacklevel set. Added new section to contributing.rst advising to set stacklevel when using warnings.warn Note: I liked @ImportanceOfBeingErnest 's suggestion of advising to set stacklevel in the documentation. I didn't find a good place for it, so I created a new section in contributing.rst. Please let me know if there's a better place or if it's too long. PR Checklist Has Pytest style unit tests Code is Flake 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: PR Summary Fix issue #10643 Added stacklevel=2 to all warnings.warn calls that didn't have stacklevel set. Added new section to contributing.rst advising to set stacklevel when using warnings....
X Description: PR Summary Fix issue #10643 Added stacklevel=2 to all warnings.warn calls that didn't have stacklevel set. Added new section to contributing.rst advising to set stacklevel when using warni...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/12006
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ca8bcff0-50f7-0617-9199-4f1678657529 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EE1C:B319:A09839:D980C0:6A53125C |
| html-safe-nonce | 8189b7678a98feb356f343e4eb8581a9c70fabaa1214043eea4d76636e28aa55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTFDOkIzMTk6QTA5ODM5OkQ5ODBDMDo2QTUzMTI1QyIsInZpc2l0b3JfaWQiOiIzMjg3NzM0MzE3OTY3Njc1OTk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9e74de6b25523bfa37057efdb589d3b648d313383e76a3cdf78d20a46cc10ea9 |
| hovercard-subject-tag | pull_request:212613679 |
| 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/matplotlib/matplotlib/pull/12006/files |
| twitter:image | https://avatars.githubusercontent.com/u/25623375?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/25623375?s=400&v=4 |
| og:image:alt | PR Summary Fix issue #10643 Added stacklevel=2 to all warnings.warn calls that didn't have stacklevel set. Added new section to contributing.rst advising to set stacklevel when using warnings.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width