9 lines
722 B
ReStructuredText
9 lines
722 B
ReStructuredText
The :ref:`Node.reportinfo() <non-python tests>` function first return value type has been expanded from `py.path.local | str` to `os.PathLike[str] | str`.
|
|
|
|
Most plugins which refer to `reportinfo()` only define it as part of a custom :class:`pytest.Item` implementation.
|
|
Since `py.path.local` is a `os.PathLike[str]`, these plugins are unaffacted.
|
|
|
|
Plugins and users which call `reportinfo()`, use the first return value and interact with it as a `py.path.local`, would need to adjust by calling `py.path.local(fspath)`.
|
|
Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead.
|
|
Note: pytest was not able to provide a deprecation period for this change.
|