This commit is contained in:
Florian Bruhin 2021-11-26 15:49:01 +01:00
parent 2c981ee07d
commit 05cf2fdae4
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
``py.path.local`` arguments for hooks have been deprecated. See :ref:`the deprecation note <legacy-path-hooks-deprecated>` for full details.
``py.path.local`` arguments to Node constructors have been deprecated. See :ref:`the deprecation note <node-ctor-fspath-deprecation>` 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``).

View File

@ -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::

1
changelog/9341.doc.rst Normal file
View File

@ -0,0 +1 @@
Various methods commonly used for :ref:`non-python tests` are now correctly documented in the reference docs. They were undocumented previously.

View File

@ -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 <legacy-path-hooks-deprecated>`.
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 <node-ctor-fspath-deprecation>`.
Directly constructing internal classes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~