From aa3c8a1d3ca0381337c23bbcc75998f26c84a93c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 29 Nov 2021 13:30:11 +0100 Subject: [PATCH] Add explanation --- changelog/7259.deprecation.rst | 3 +++ changelog/8144.feature.rst | 8 ++++++-- changelog/8251.feature.rst | 3 +++ doc/en/deprecations.rst | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/changelog/7259.deprecation.rst b/changelog/7259.deprecation.rst index 0668efdf9..f9f5a6629 100644 --- a/changelog/7259.deprecation.rst +++ b/changelog/7259.deprecation.rst @@ -5,3 +5,6 @@ .. 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``). + 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 752ee0425..03a3e4f2b 100644 --- a/changelog/8144.feature.rst +++ b/changelog/8144.feature.rst @@ -8,5 +8,9 @@ The following hooks now receive an additional ``pathlib.Path`` argument, equival .. 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``). + ``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/8251.feature.rst b/changelog/8251.feature.rst index c6c677c96..f4fbf5b5d 100644 --- a/changelog/8251.feature.rst +++ b/changelog/8251.feature.rst @@ -4,3 +4,6 @@ due to the ongoing migration of methods like :meth:`~_pytest.Item.reportinfo`, w .. note:: The name of the attributes (old ``fspath``, new ``path``) is **the opposite** of the situation for hooks. + 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 4f1521a93..b88cd16c7 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -59,6 +59,9 @@ Plugins which implement custom items and collectors are encouraged to replace .. note:: The name of the arguments (old ``fspath``, new ``path``) is **the opposite** of the situation for hooks, :ref:`outlined below `. + 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). Due to the ongoing migration of methods like :meth:`~_pytest.Item.reportinfo` which still is expected to return a ``py.path.local`` object, nodes still have @@ -86,6 +89,9 @@ The accompanying ``py.path.local`` based paths have been deprecated: plugins whi .. 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 `. + 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). Directly constructing internal classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~