Skip to content
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

Merged
merged 4 commits into from Jun 2, 2020

Conversation

bluetech
Copy link
Member

This covers some loose ends from #7255 and fixes the issue reported later in #4049.

@bluetech
Copy link
Member Author

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
Copy link
Member

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(
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great follow up!

@bluetech bluetech merged commit 85b5a28 into pytest-dev:master Jun 2, 2020
@bluetech bluetech deleted the warnings-hook-leftovers branch July 14, 2020 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants