Skip to content

Commit

Permalink
Change PytestReturnNotNoneWarning to return a normal warning (#11211)
Browse files Browse the repository at this point in the history
Fixes #10465
  • Loading branch information
fraserstark authored Sep 7, 2023
1 parent e787d2e commit 333e4eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Feng Ma
Florian Bruhin
Florian Dahlitz
Floris Bruynooghe
Fraser Stark
Gabriel Landau
Gabriel Reis
Garvit Shubham
Expand Down
1 change: 1 addition & 0 deletions changelog/10465.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test functions returning a value other than None will now issue a :class:`pytest.PytestWarning` instead of :class:`pytest.PytestRemovedIn8Warning`, meaning this will stay a warning instead of becoming an error in the future.
3 changes: 1 addition & 2 deletions changelog/11151.breaking.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Dropped support for Python 3.7, which `reached end-of-life on 2023-06-27
<https://devguide.python.org/versions/>`__.
Dropped support for Python 3.7, which `reached end-of-life on 2023-06-27 <https://devguide.python.org/versions/>`__.
2 changes: 1 addition & 1 deletion src/_pytest/warning_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class PytestRemovedIn9Warning(PytestDeprecationWarning):
__module__ = "pytest"


class PytestReturnNotNoneWarning(PytestRemovedIn8Warning):
class PytestReturnNotNoneWarning(PytestWarning):
"""Warning emitted when a test function is returning value other than None."""

__module__ = "pytest"
Expand Down

0 comments on commit 333e4eb

Please sign in to comment.