◐ Shell
clean mode source ↗

GH-127381: pathlib ABCs: remove uncommon `PurePathBase` methods by barneygale · Pull Request #127853 · python/cpython

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

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.