]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127381: pathlib ABCs: remove `PathBase.resolve()` and `absolute()` (#127707)
authorBarney Gale <barney.gale@gmail.com>
Fri, 6 Dec 2024 21:39:45 +0000 (21:39 +0000)
committerGitHub <noreply@github.com>
Fri, 6 Dec 2024 21:39:45 +0000 (21:39 +0000)
commit31c9f3ced293492b38e784c17c4befe425da5dab
treeb1c83ae065746025ec183c067c6dae52bb04de13
parent0fc4063747c96223575f6f5a0562eddf2ed0ed62
GH-127381: pathlib ABCs: remove `PathBase.resolve()` and `absolute()` (#127707)

Remove our implementation of POSIX path resolution in `PathBase.resolve()`.
This functionality is rather fragile and isn't necessary in most cases. It
depends on `PathBase.stat()`, which we're looking to remove.

Also remove `PathBase.absolute()`. Many legitimate virtual filesystems lack
the notion of a 'current directory', so it's wrong to include in the basic
interface.
Lib/pathlib/_abc.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py