Title: configure warnings as errors in the test suite · Issue #128770 · python/cpython · GitHub
Open Graph Title: configure warnings as errors in the test suite · Issue #128770 · python/cpython
X Title: configure warnings as errors in the test suite · Issue #128770 · python/cpython
Description: Feature or enhancement Proposal: It's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: #127949 (comment) I think it would be useful to either configure warnings as errors in...
Open Graph Description: Feature or enhancement Proposal: It's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: #127949 (comment) I think it would be useful t...
X Description: Feature or enhancement Proposal: It's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: #127949 (comment) I think it would be usef...
Opengraph URL: https://github.com/python/cpython/issues/128770
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"configure warnings as errors in the test suite","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nIt's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: https://github.com/python/cpython/issues/127949#issuecomment-2558227488\n\nI think it would be useful to either configure warnings as errors in the test suite (and then capture unraisable/threadexcept errors using a mechanism like pytest has) or tee any warnings produced, and fail CI if any have been produced that were not captured with catch_warnings or assertWarns etc like https://pypi.org/project/pytest-max-warnings/\n\n### Has this already been discussed elsewhere?\n\nI have already discussed this feature proposal on Discourse\n\n### Links to previous discussion of this feature:\n\nhttps://discuss.python.org/t/its-too-easy-to-introduce-noise-in-cpythons-test-suite-output-resourcewarnings-and-deprecationwarnings/75234\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128726\n* gh-128906\n* gh-128935\n* gh-128936\n* gh-128973\n* gh-129179\n* gh-131802\n* gh-131824\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/graingert","@type":"Person","name":"graingert"},"datePublished":"2025-01-13T07:57:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/128770/cpython/issues/128770"}
| 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:1b6ba502-52c5-b277-d83b-10a930b9f5eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 985E:18C7E2:1F8F571:2AAA6CC:6A537B58 |
| html-safe-nonce | f4927f8bd05961a84fefce3d6a8a8fec43724659c9d4c5cf1d9d959a20ce932f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODVFOjE4QzdFMjoxRjhGNTcxOjJBQUE2Q0M6NkE1MzdCNTgiLCJ2aXNpdG9yX2lkIjoiMzgzOTg0MzA0Mzc4OTQ3MDU1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 373fba9e5662f222998b63185427fd7b889f7febd22820f5bbf886611ae67ff9 |
| hovercard-subject-tag | issue:2783265878 |
| 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/128770/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1823b9b8763a4744f2f7e8787646eb49c6a686b456dbbb0a105feec1f901d16e/python/cpython/issues/128770 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1823b9b8763a4744f2f7e8787646eb49c6a686b456dbbb0a105feec1f901d16e/python/cpython/issues/128770 |
| og:image:alt | Feature or enhancement Proposal: It's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: #127949 (comment) I think it would be useful t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graingert |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width