Skip to content

pytest 7: path vs. fspath, pathlib vs. py.path #9283

@The-Compiler

Description

@The-Compiler

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: help wanteddevelopers would like help from experts on this topic

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions