Skip to content

Commit

Permalink
Mark tryfirst/trylast as deprecated in their docs.
Browse files Browse the repository at this point in the history
Follow-up to pytest-dev#9118
  • Loading branch information
The-Compiler committed Oct 7, 2022
1 parent 4677580 commit 72cac9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,14 @@ def pytest_configure(self, config: "Config") -> None:
config.addinivalue_line(
"markers",
"tryfirst: mark a hook implementation function such that the "
"plugin machinery will try to call it first/as early as possible.",
"plugin machinery will try to call it first/as early as possible. "
"DEPRECATED, use @pytest.hookimpl(tryfirst=True) instead.",
)
config.addinivalue_line(
"markers",
"trylast: mark a hook implementation function such that the "
"plugin machinery will try to call it last/as late as possible.",
"plugin machinery will try to call it last/as late as possible. "
"DEPRECATED, use @pytest.hookimpl(trylast=True) instead.",
)
self._configured = True

Expand Down

0 comments on commit 72cac9b

Please sign in to comment.