Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-128520: Divide pathlib ABCs into three classes #128523

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jan 5, 2025

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, which will help with write-only filesystems. For a couple of reasons, this isn't quite possible yet.

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`. For a couple of reasons,
this isn't quite possible yet.

In a later patch, we'll make `WritablePath` inherit directly from
`JoinablePath` rather than `ReadablePath`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant