diff --git a/changelog/14335.deprecation.rst b/changelog/14335.deprecation.rst new file mode 100644 index 00000000000..e173ac6938f --- /dev/null +++ b/changelog/14335.deprecation.rst @@ -0,0 +1,2 @@ +The method of configuring hooks using markers, deprecated since pytest 7.2, is now scheduled to be removed in pytest 10. +See :ref:`hook-markers` for more details. diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index 75e7a180eb0..8f9504f8609 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -171,9 +171,13 @@ Simply remove the ``__init__.py`` file entirely. Python 3.3+ natively supports namespace packages without ``__init__.py``. +.. _hook-markers: + Configuring hook specs/impls using markers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. deprecated:: 7.2 + Before pluggy, pytest's plugin library, was its own package and had a clear API, pytest just used ``pytest.mark`` to configure hooks. diff --git a/src/_pytest/deprecated.py b/src/_pytest/deprecated.py index 9fe761e8ab4..ec3f9fcbfd8 100644 --- a/src/_pytest/deprecated.py +++ b/src/_pytest/deprecated.py @@ -39,7 +39,7 @@ HOOK_LEGACY_MARKING = UnformattedWarning( - PytestDeprecationWarning, + PytestRemovedIn10Warning, "The hook{type} {fullname} uses old-style configuration options (marks or attributes).\n" "Please use the pytest.hook{type}({hook_opts}) decorator instead\n" " to configure the hooks.\n"