Skip to content

Commit 3de823b

Browse files
committed
Schedule deprecated legacy hook marks for removal in pytest 10
By the time pytest 10 is released, this will have been deprecated for more than 5 years (0fdacb6), and the alternative syntax available for over 10 years (d2a5c7f), which seems like enough time. Removal will simplify PytestPluginManager and leave us with one way for setting hookspec/hookimpl options (the plan after removal is to just treat the old markers as normal markers, not hard-error on them).
1 parent bc57e69 commit 3de823b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

doc/en/deprecations.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ Python 3.3+ natively supports namespace packages without ``__init__.py``.
174174
Configuring hook specs/impls using markers
175175
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176176

177+
.. deprecated:: 7.2
178+
177179
Before pluggy, pytest's plugin library, was its own package and had a clear API,
178180
pytest just used ``pytest.mark`` to configure hooks.
179181

src/_pytest/deprecated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
HOOK_LEGACY_MARKING = UnformattedWarning(
42-
PytestDeprecationWarning,
42+
PytestRemovedIn10Warning,
4343
"The hook{type} {fullname} uses old-style configuration options (marks or attributes).\n"
4444
"Please use the pytest.hook{type}({hook_opts}) decorator instead\n"
4545
" to configure the hooks.\n"

0 commit comments

Comments
 (0)