-
-
Couldn't load subscription status.
- Fork 33.3k
GH-128520: Divide pathlib ABCs into three classes #128523
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
Conversation
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`.
|
In the private pathlib ABCs, rename
PurePathBasetoJoinablePath, and splitPathBaseintoReadablePathandWritablePath. This improves the API fit for read-only virtual filesystems.The split of
PathBaseentails a similar split ofCopyWorker(implements copying) and the test cases intest_pathlib_abc.In a later patch, we'll make
WritablePathinherit directly fromJoinablePathrather thanReadablePath, which will help with write-only filesystems. For a couple of reasons, this isn't quite possible yet.