test_ok2/doc/en/example
Ran Benita 7eee5c1634 Change `Node.reportinfo()` return value from `py.path` to `str|os.PathLike[str]`
`reportinfo()` is the last remaining py.path-only code path in pytest,
i.e. the last piece holding back py.path deprecation. The problem with
it is that plugins/users use it from both sides -- implementing it
(returning the value) and using it (using the return value). Dealing
with implementers is easy enough -- allow to return `os.PathLike[str]`.
But for callers who expect strictly `py.path` this will break and
there's not really a good way to provide backward compat for this.

From analyzing a corpus of 680 pytest plugins, the vast majority of
`reportinfo` appearances are implementations, and the few callers don't
actually access the path part of the return tuple.

As for test suites that might access `reportinfo` (e.g. using
`request.node.reportinfo()` or other ways), that is much harder to
survey, but from the ones I searched, I only found case
(`pytest_teamcity`, but even then it uses `str(fspath)` so is unlikely
to be affected in practice). They are better served with using
`node.location` or `node.path` directly.

Therefore, just break it and change the return type to
`str|os.PathLike[str]`.

Refs #7259.
2021-10-09 15:02:03 +03:00
..
assertion Remove/replace some unneeded usages of py.path 2021-03-14 14:12:28 +02:00
fixtures Include figures in PDF docs 2021-09-02 17:40:41 -06:00
nonpython Change `Node.reportinfo()` return value from `py.path` to `str|os.PathLike[str]` 2021-10-09 15:02:03 +03:00
attic.rst ran pyupgrade-docs 2019-08-06 12:40:27 -07:00
conftest.py pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
index.rst Added how-to and reference directories. 2021-03-11 22:13:01 +00:00
markers.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
multipython.py Remove/replace some unneeded usages of py.path 2021-03-14 14:12:28 +02:00
nonpython.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
parametrize.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
pythoncollection.py pre-commit run pyupgrade --all-files 2019-06-03 12:08:02 -03:00
pythoncollection.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
reportingdemo.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
simple.rst fix #8818 - run regendoc without tox cachedir 2021-10-04 08:56:26 +02:00
special.rst Preparing release version 5.1.3 2019-09-18 10:11:59 -03:00
xfail_demo.py pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00