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
warnings: fix missing None in existing hook & add some docs #7288
Conversation
cc @gnikonorov. Wanted to submit this before we forget about this topic. |
@@ -20,6 +20,17 @@ Below is a complete list of all pytest features which are considered deprecated. | |||
:ref:`standard warning filters <warnings>`. | |||
|
|||
|
|||
The ``pytest_warning_captured`` hook |
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.
I didn't realize we had a deprecation file. Thanks @bluetech
@@ -112,7 +112,12 @@ def catch_warnings_for_item(config, ihook, when, item): | |||
|
|||
for warning_message in log: | |||
ihook.pytest_warning_captured.call_historic( |
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.
Do we usually update deprecated hooks? Asking for my own knowledge. I wasn't sure when I made the change for pytest_warning_recorded
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.
I think it makes sense to update deprecated hooks if it's a simple bugfix like this.
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.
Great follow up!
This covers some loose ends from #7255 and fixes the issue reported later in #4049.