Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GH-127381: pathlib ABCs: remove uncommon PurePathBase methods #127853

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

Merged
merged 3 commits into from
Dec 29, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Dec 12, 2024

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.

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.
@barneygale barneygale changed the title GH-126381: pathlib ABCs: remove uncommon PurePathBase methods GH-127714: pathlib ABCs: remove uncommon PurePathBase methods Dec 12, 2024
@barneygale barneygale changed the title GH-127714: pathlib ABCs: remove uncommon PurePathBase methods GH-127381: pathlib ABCs: remove uncommon PurePathBase methods Dec 12, 2024
@barneygale barneygale enabled auto-merge (squash) December 29, 2024 21:44
@barneygale barneygale merged commit ef63cca into python:main Dec 29, 2024
36 checks passed
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…python#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.
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