]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-128520: Divide pathlib ABCs into three classes (#128523)
authorBarney Gale <barney.gale@gmail.com>
Sat, 11 Jan 2025 19:27:47 +0000 (19:27 +0000)
committerGitHub <noreply@github.com>
Sat, 11 Jan 2025 19:27:47 +0000 (19:27 +0000)
commit22a442181d5f1ac496dac08e24fd852de404882f
treeeba5ef2eb665ab76911750ac5286a035ff29d729
parent0946ed25b53dddfa4eb040513720353b7214d71b
GH-128520: Divide pathlib ABCs into three classes (#128523)

In the private pathlib ABCs, rename `PurePathBase` to `JoinablePath`, and
split `PathBase` into `ReadablePath` and `WritablePath`. This improves the
API fit for read-only virtual filesystems.

The split of `PathBase` entails a similar split of `CopyWorker` (implements
copying) and the test cases in `test_pathlib_abc`.

In a later patch, we'll make `WritablePath` inherit directly from
`JoinablePath` rather than `ReadablePath`. For a couple of reasons,
this isn't quite possible yet.
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