Title: Add more examples in the `warnings` docs · Issue #93343 · python/cpython · GitHub
Open Graph Title: Add more examples in the `warnings` docs · Issue #93343 · python/cpython
X Title: Add more examples in the `warnings` docs · Issue #93343 · python/cpython
Description: This is a follow-up of GH-86438 and GH-23172. The warnings docs should include more examples to show how to match different types of warnings using both the provided functions and -W/PYTHONWARNINGS, especially since they behave different...
Open Graph Description: This is a follow-up of GH-86438 and GH-23172. The warnings docs should include more examples to show how to match different types of warnings using both the provided functions and -W/PYTHONWARNINGS...
X Description: This is a follow-up of GH-86438 and GH-23172. The warnings docs should include more examples to show how to match different types of warnings using both the provided functions and -W/PYTHONWARNINGS...
Opengraph URL: https://github.com/python/cpython/issues/93343
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add more examples in the `warnings` docs","articleBody":"This is a follow-up of GH-86438 and GH-23172. The `warnings` docs should include more examples to show how to match different types of warnings using both the provided functions and `-W`/`PYTHONWARNINGS`, especially since they behave differently.\r\n\r\nAt the bottom of https://github.com/pytest-dev/pytest/discussions/8759#discussioncomment-2818984 there are already some examples to illustrate some of the differences, even though some are specific to pytest.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-106618\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/ezio-melotti","@type":"Person","name":"ezio-melotti"},"datePublished":"2022-05-30T01:57:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/93343/cpython/issues/93343"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:122845a9-d791-ed1e-0427-0d6479ea3436 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EE0:3A486F:29A92E3:38ABCBD:6A53B711 |
| html-safe-nonce | f78f26277e2e270d8ee89730cdf3f2615883dcb8837d9ec5096e2f4d71ef9156 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUUwOjNBNDg2RjoyOUE5MkUzOjM4QUJDQkQ6NkE1M0I3MTEiLCJ2aXNpdG9yX2lkIjoiNjMzMjM2MzY3NTQ5MjY2MTAwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d5049805462dda7914a2c8c3099cb92ce4d49b99a0f5d7bdd8dc8208adbead8 |
| hovercard-subject-tag | issue:1252083797 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/93343/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f8735eed82be1449a50fbcc4a418700d3f055c741379e84a54624af848462ba/python/cpython/issues/93343 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f8735eed82be1449a50fbcc4a418700d3f055c741379e84a54624af848462ba/python/cpython/issues/93343 |
| og:image:alt | This is a follow-up of GH-86438 and GH-23172. The warnings docs should include more examples to show how to match different types of warnings using both the provided functions and -W/PYTHONWARNINGS... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ezio-melotti |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| 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