Skip to content

GH-127381: pathlib ABCs: remove remaining uncommon PathBase methods #127714

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 12, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Dec 7, 2024

Remove the following methods from pathlib._abc.PathBase:

  • expanduser()
  • hardlink_to()
  • touch()
  • chmod()
  • lchmod()
  • owner()
  • group()
  • from_uri()
  • as_uri()

These operations aren't regularly supported in virtual filesystems, so they don't win a place in the PathBase interface. (Some of them probably don't deserve a place in Path :P.) They're quasi-abstract (except lchmod()), and they're not called by other PathBase methods.

…ethods

Remove the following methods from `pathlib._abc.PathBase`:

- `expanduser()`
- `hardlink_to()`
- `touch()`
- `chmod()`
- `lchmod()`
- `owner()`
- `group()`
- `from_uri()`
- `as_uri()`

These operations aren't regularly supported in virtual filesystems, so they
don't win a place in the `PathBase` interface. (Some of them probably don't
deserve a place in `Path` :P.) They're quasi-abstract (except `lchmod()`),
and they're not called by other `PathBase` methods.
@barneygale barneygale merged commit 292afd1 into python:main Dec 12, 2024
36 checks passed
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…ethods (python#127714)

Remove the following methods from `pathlib._abc.PathBase`:

- `expanduser()`
- `hardlink_to()`
- `touch()`
- `chmod()`
- `lchmod()`
- `owner()`
- `group()`
- `from_uri()`
- `as_uri()`

These operations aren't regularly supported in virtual filesystems, so they
don't win a place in the `PathBase` interface. (Some of them probably don't
deserve a place in `Path` :P.) They're quasi-abstract (except `lchmod()`),
and they're not called by other `PathBase` methods.
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.

2 participants