diff --git a/changelog/7259.deprecation.rst b/changelog/7259.deprecation.rst index f9f5a6629..ae857c0d8 100644 --- a/changelog/7259.deprecation.rst +++ b/changelog/7259.deprecation.rst @@ -3,8 +3,10 @@ ``py.path.local`` arguments to Node constructors have been deprecated. See :ref:`the deprecation note ` for full details. .. note:: - The name of the ``Node`` arguments and attributes (old ``fspath``, new ``path``) is **the opposite** - of the situation for hooks (old ``path``, new ``fspath``). + The name of the :class:`~_pytest.nodes.Node` arguments and attributes (the + new attribute being ``path``) is **the opposite** of the situation for hooks + (the old argument being ``path``). + This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the :pypi:`py` dependency (see :issue:`9283` for a longer discussion). diff --git a/changelog/8144.feature.rst b/changelog/8144.feature.rst index 03a3e4f2b..fe576eeff 100644 --- a/changelog/8144.feature.rst +++ b/changelog/8144.feature.rst @@ -7,9 +7,9 @@ The following hooks now receive an additional ``pathlib.Path`` argument, equival - :func:`pytest_report_collectionfinish <_pytest.hookspec.pytest_report_collectionfinish>` - The ``start_path`` parameter (equivalent to existing ``startdir`` parameter). .. note:: - The name of the ``Node`` arguments and attributes (the new attribute being - ``path``) is **the opposite** of the situation for hooks (the old argument - being ``path``). + The name of the :class:`~_pytest.nodes.Node` arguments and attributes (the + new attribute being ``path``) is **the opposite** of the situation for hooks + (the old argument being ``path``). This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the :pypi:`py` diff --git a/changelog/8251.feature.rst b/changelog/8251.feature.rst index f4fbf5b5d..fe157cc98 100644 --- a/changelog/8251.feature.rst +++ b/changelog/8251.feature.rst @@ -2,8 +2,10 @@ Implement ``Node.path`` as a ``pathlib.Path``. Both the old ``fspath`` and this due to the ongoing migration of methods like :meth:`~_pytest.Item.reportinfo`, we expect to deprecate it in a future release. .. note:: - The name of the attributes (old ``fspath``, new ``path``) is **the opposite** - of the situation for hooks. + The name of the :class:`~_pytest.nodes.Node` arguments and attributes (the + new attribute being ``path``) is **the opposite** of the situation for hooks + (the old argument being ``path``). + This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the :pypi:`py` dependency (see :issue:`9283` for a longer discussion). diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index b88cd16c7..ea9ef2aa3 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -57,8 +57,11 @@ Plugins which implement custom items and collectors are encouraged to replace (``pathlib.Path``), and drop any other usage of the ``py`` library if possible. .. note:: - The name of the arguments (old ``fspath``, new ``path``) is **the opposite** - of the situation for hooks, :ref:`outlined below `. + The name of the :class:`~_pytest.nodes.Node` arguments and attributes (the + new attribute being ``path``) is **the opposite** of the situation for + hooks, :ref:`outlined below ` (the old + argument being ``path``). + This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the :pypi:`py` dependency (see :issue:`9283` for a longer discussion). @@ -87,8 +90,11 @@ In order to support the transition from ``py.path.local`` to :mod:`pathlib`, the The accompanying ``py.path.local`` based paths have been deprecated: plugins which manually invoke those hooks should only pass the new ``pathlib.Path`` arguments, and users should change their hook implementations to use the new ``pathlib.Path`` arguments. .. note:: - The name of the arguments (old ``path``, new ``fspath``) is **the opposite** - of the situation for the :class:`~_pytest.nodes.Node` class, :ref:`outlined above `. + The name of the :class:`~_pytest.nodes.Node` arguments and attributes, + :ref:`outlined above ` (the new attribute + being ``path``) is **the opposite** of the situation for hooks (the old + argument being ``path``). + This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the :pypi:`py` dependency (see :issue:`9283` for a longer discussion).