Under-the-hood functionality in pathlib is divided between:
The 'flavour', which implements path syntax (separators, casefolding, etc)
The 'accessor', which accesses the local (file)system.
The '_WindowsFlavour/_PosixFlavour.resolve()' function is misplaced, as it requires OS calls such as os.getcwd(), os.readlink(), and nt._getfinalpathname(). While the implementation does differ across Windows and POSIX, it's still properly part of the accessor interface, and not the flavour interface.
In preparation for addressing bpo-24132 I'd like to get these interfaces really tidy. Once bpo-39899 is fixed, this will be the last remaining flavour method that does accessor-y things.
New changeset baecfbd by Barney Gale in branch 'master': bpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path (GH-25264) baecfbd
New changeset ea14a07 by Miss Islington (bot) in branch '3.10': bpo-43757: Document os.path.realpath(strict=True) in 3.10 whatsnew. (GH-26090) (bpo-26099) ea14a07
New changeset ee51c56 by Barney Gale in branch '3.10':
[3.10] bpo-38671: Add test that pathlib.Path.resolve() returns an absolute path. (GH-26184) (GH-26270) ee51c56
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: