From 72cac9b1af32a3edeb48f15d78bf8d006373c9e6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 7 Oct 2022 12:16:53 +0200 Subject: [PATCH] Mark tryfirst/trylast as deprecated in their docs. Follow-up to #9118 --- src/_pytest/config/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index cffbb6dc4..25f156f8b 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -512,12 +512,14 @@ class PytestPluginManager(PluginManager): 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