]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127381: pathlib ABCs: remove uncommon `PurePathBase` methods (#127853)
authorBarney Gale <barney.gale@gmail.com>
Sun, 29 Dec 2024 22:07:12 +0000 (22:07 +0000)
committerGitHub <noreply@github.com>
Sun, 29 Dec 2024 22:07:12 +0000 (22:07 +0000)
commitef63cca494571f50906baae1d176469a3dcf8838
tree1b9b86826bd40be1039855410ba54cb567c32070
parentc78729f2df7c0e220f1080edb2a0d0cdd49e22df
GH-127381: pathlib ABCs: remove uncommon `PurePathBase` methods (#127853)

Remove `PurePathBase.relative_to()` and `is_relative_to()` because they
don't account for *other* being an entirely different kind of path, and
they can't use `__eq__()` because it's not on the `PurePathBase` interface.

Remove `PurePathBase.drive`, `root`, `is_absolute()` and `as_posix()`.
These are all too specific to local filesystems.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/pathlib/_types.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py