pytest 7: path vs. fspath, pathlib vs. py.path · Issue #9283 · pytest-dev/pytest (original) (raw)

I've just been looking through the changelog for pytest 7 and noticed something I'd like to discuss before the release:

In #8144, @bluetech added pathlib alternatives to various hooks, and called them fspath, with the old py.path.local alternatives keeping their path name.

However, in #8251, @RonnyPfannschmidt added a pathlib attribute to Node, and called it path, with the old py.path one being called fspath...

We then reverted the Node.fspath deprecation in #8903 after some discussion in #8821, but kept the new path attribute...

However, the naming inconsistency seems like something that could confuse people. What to do? Keep it as is, or revert the new attribute entirely until we figured out the rest of the deprecation? Make it private perhaps?