diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index e2b2635af..80983ecdf 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -119,7 +119,7 @@ Deprecations - ``_pytest.tmpdir.TempPathFactory`` - ``_pytest.tmpdir.TempdirFactory`` - These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0. + These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8.0.0. - `#7530 `_: The ``--strict`` command-line option has been deprecated, use ``--strict-markers`` instead. @@ -205,7 +205,7 @@ Improvements - ``pytest.WarningsRecorder`` for the :fixture:`recwarn` fixture. Constructing them is not supported (except for `MonkeyPatch`); they are only meant for use in type annotations. - Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0. + Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0. Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy. diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py index cb000d841..b82fd9a86 100644 --- a/testing/test_recwarn.py +++ b/testing/test_recwarn.py @@ -318,7 +318,7 @@ class TestWarns: assert str(record[1].message) == "runtime" def test_record_only_none_deprecated_warn(self) -> None: - # This should become an error when WARNS_NONE_ARG is removed in Pytest 7.0 + # This should become an error when WARNS_NONE_ARG is removed in Pytest 8.0 with warnings.catch_warnings(): warnings.simplefilter("ignore") with pytest.warns(None) as record: # type: ignore[call-overload]