-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure warnings as errors in the test suite #128770
Labels
Comments
See #110012 |
See #128816 test_doctest also has a warning |
I'm thinking we mark these as |
hugovk
pushed a commit
that referenced
this issue
Jan 17, 2025
…ocket which still logs warnings (#128726) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Brett Cannon <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 17, 2025
…test_socket which still logs warnings (pythonGH-128726) (cherry picked from commit 7807b40) Co-authored-by: Thomas Grainger <[email protected]> Co-authored-by: sobolevn <[email protected]> Co-authored-by: Brett Cannon <[email protected]>
hugovk
added a commit
to hugovk/cpython
that referenced
this issue
Jan 17, 2025
…ept for test_socket which still logs warnings (python#128726)" This reverts commit 7807b40.
hugovk
added a commit
that referenced
this issue
Jan 17, 2025
graingert
added a commit
to graingert/cpython
that referenced
this issue
Jan 18, 2025
…cept for test_socket which still logs warnings (python#128726)" (python#128936) This reverts commit 76856ae.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 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/
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/its-too-easy-to-introduce-noise-in-cpythons-test-suite-output-resourcewarnings-and-deprecationwarnings/75234
Linked PRs
The text was updated successfully, but these errors were encountered: