Skip to content

Commit 333e4eb

Browse files
authored
Change PytestReturnNotNoneWarning to return a normal warning (#11211)
Fixes #10465
1 parent e787d2e commit 333e4eb

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Feng Ma
143143
Florian Bruhin
144144
Florian Dahlitz
145145
Floris Bruynooghe
146+
Fraser Stark
146147
Gabriel Landau
147148
Gabriel Reis
148149
Garvit Shubham

changelog/10465.deprecation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

changelog/11151.breaking.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Dropped support for Python 3.7, which `reached end-of-life on 2023-06-27
2-
<https://devguide.python.org/versions/>`__.
1+
Dropped support for Python 3.7, which `reached end-of-life on 2023-06-27 <https://devguide.python.org/versions/>`__.

src/_pytest/warning_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class PytestRemovedIn9Warning(PytestDeprecationWarning):
6161
__module__ = "pytest"
6262

6363

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

6767
__module__ = "pytest"

0 commit comments

Comments
 (0)