Skip to content

Commit 72cac9b

Browse files
committed
Mark tryfirst/trylast as deprecated in their docs.
Follow-up to pytest-dev#9118
1 parent 4677580 commit 72cac9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/_pytest/config/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,14 @@ def pytest_configure(self, config: "Config") -> None:
512512
config.addinivalue_line(
513513
"markers",
514514
"tryfirst: mark a hook implementation function such that the "
515-
"plugin machinery will try to call it first/as early as possible.",
515+
"plugin machinery will try to call it first/as early as possible. "
516+
"DEPRECATED, use @pytest.hookimpl(tryfirst=True) instead.",
516517
)
517518
config.addinivalue_line(
518519
"markers",
519520
"trylast: mark a hook implementation function such that the "
520-
"plugin machinery will try to call it last/as late as possible.",
521+
"plugin machinery will try to call it last/as late as possible. "
522+
"DEPRECATED, use @pytest.hookimpl(trylast=True) instead.",
521523
)
522524
self._configured = True
523525

0 commit comments

Comments
 (0)