You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `-p no:legacypath` option for `pytest` prevents using legacy
`py.path` and forces using `pathlib` from the Python standard library
instead. 07e12f4 (Remove usage of
`py.path` with `pytest` 7) attempted to remove all uses of `py.path`
with `pytest` >= 7 so that downstream packages could use that option,
(at least with recent enough `pytest`). That commit introduced using
`getattr()` to access the `path` attribute of `_pytest.nodes.Node`
instances and falling back to the `fspath` attribute if `path` does not
exist (which happens with `pytest` < 7). However, evaluating the
`default` for `getattr()` then guarantees that `fspath` is accessed,
which is incompatible with `-p no:legacypath`. The simplest way of
avoiding accessing `fspath` is to use explicitly version-dependent code.
0 commit comments