]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127381: pathlib ABCs: remove remaining uncommon `PathBase` methods (#127714)
authorBarney Gale <barney.gale@gmail.com>
Thu, 12 Dec 2024 06:49:34 +0000 (06:49 +0000)
committerGitHub <noreply@github.com>
Thu, 12 Dec 2024 06:49:34 +0000 (06:49 +0000)
commit292afd1d51dd7aacb12a6165f596ae7bb58c9ba8
treee2de2c8ea4260e39f3f591e4c659181986b52181
parent8bbd379ee30db0320ec3d31c37aee2a503902b0f
GH-127381: pathlib ABCs: remove remaining uncommon `PathBase` methods (#127714)

Remove the following methods from `pathlib._abc.PathBase`:

- `expanduser()`
- `hardlink_to()`
- `touch()`
- `chmod()`
- `lchmod()`
- `owner()`
- `group()`
- `from_uri()`
- `as_uri()`

These operations aren't regularly supported in virtual filesystems, so they
don't win a place in the `PathBase` interface. (Some of them probably don't
deserve a place in `Path` :P.) They're quasi-abstract (except `lchmod()`),
and they're not called by other `PathBase` methods.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib_abc.py