From 05cf2fdae4e77f8ccf310b6daf4d9ffd109d0353 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 26 Nov 2021 15:49:01 +0100 Subject: [PATCH] fixups --- changelog/7259.deprecation.rst | 4 ++++ changelog/8251.feature.rst | 2 +- changelog/9341.doc.rst | 1 + doc/en/deprecations.rst | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelog/9341.doc.rst diff --git a/changelog/7259.deprecation.rst b/changelog/7259.deprecation.rst index c0307740d..0668efdf9 100644 --- a/changelog/7259.deprecation.rst +++ b/changelog/7259.deprecation.rst @@ -1,3 +1,7 @@ ``py.path.local`` arguments for hooks have been deprecated. See :ref:`the deprecation note ` for full details. ``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``). diff --git a/changelog/8251.feature.rst b/changelog/8251.feature.rst index e1cf29715..c6c677c96 100644 --- a/changelog/8251.feature.rst +++ b/changelog/8251.feature.rst @@ -1,4 +1,4 @@ -Implement ``Node.path`` as a ``pathlib.Path``. This attribute gets set no matter whether ``path`` or (deprecated) ``fspath`` is passed to the constructor. It is a replacement for the ``fspath`` attribute (which represents the same path as ``py.path.local``). While ``fspath`` is not deprecated yet +Implement ``Node.path`` as a ``pathlib.Path``. Both the old ``fspath`` and this new attribute gets set no matter whether ``path`` or ``fspath`` (deprecated) is passed to the constructor. It is a replacement for the ``fspath`` attribute (which represents the same path as ``py.path.local``). While ``fspath`` is not deprecated yet due to the ongoing migration of methods like :meth:`~_pytest.Item.reportinfo`, we expect to deprecate it in a future release. .. note:: diff --git a/changelog/9341.doc.rst b/changelog/9341.doc.rst new file mode 100644 index 000000000..1b97a5812 --- /dev/null +++ b/changelog/9341.doc.rst @@ -0,0 +1 @@ +Various methods commonly used for :ref:`non-python tests` are now correctly documented in the reference docs. They were undocumented previously. diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index a45d376f3..4f1521a93 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -58,7 +58,7 @@ 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 <_legacy-path-hooks-deprecated>`. + of the situation for hooks, :ref:`outlined below `. 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 @@ -85,7 +85,7 @@ 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 <_node-ctor-fspath-deprecation>`. + of the situation for the :class:`~_pytest.nodes.Node` class, :ref:`outlined above `. Directly constructing internal classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~