-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-103109: Add documentation for ignore_warnings
#103110
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard reminder: You can directly apply the suggestion below by simply clicking Commit suggestion, entering a descriptive commit message and then clicking Commit changes
One fix for some textual errors/issues, otherwise LGTM - thanks @CharlieZhao95 !
Co-authored-by: C.A.M. Gerlach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @CharlieZhao95 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a versionadded:: 3.8
. Also, I think there's some relevant information in the docstring that should be included in the docs, namely that this decorator should be used with care since tools like Forget that last part; too little coffee for me! ☕ ☕ ☕git blame
may become less useful with warnings suppressed.
Also note that there's a targeted variant called ignore_warnings_from
(that's also undocumented1).
Footnotes
-
Note that a lot of the test support functions are undocumented, some deliberately so, simply because they're mostly for internal use. ↩
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Oh BTW, would you mind reflowing this according to SemBr (within 79 chars line width)? If not, I'll do that before merging. |
Oh! Thanks for your suggestion. I love these nits! This doesn't look too hard, I can try to get it done, and I'll try to follow the SemBr spec going forward. Improvements are always good! 😃 |
Co-authored-by: C.A.M. Gerlach <[email protected]>
BTW, I didn't find the code that matches |
FWIW I couldn't find it either, grepping the codebase for that string and also searching the repo, issues, commits, PRs, etc. on GitHub (except for this one, of course). |
Sorry, that was a typo on my side :) It's cpython/Lib/test/support/__init__.py Lines 2217 to 2225 in c1e71ce
And, as far as I can see, it is only used in the tests for |
Co-authored-by: C.A.M. Gerlach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM again, thanks @CharlieZhao95
Thanks @CharlieZhao95 for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
…onGH-103110) (cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
GH-103198 is a backport of this pull request to the 3.11 branch. |
GH-103199 is a backport of this pull request to the 3.10 branch. |
…onGH-103110) (cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 32937d6) Co-authored-by: Charlie Zhao <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
…on#103110) Co-authored-by: C.A.M. Gerlach <[email protected]>
…on#103110) Co-authored-by: C.A.M. Gerlach <[email protected]>
ignore_warnings
ignore_warnings
ignore_warnings
#103109