Skip to content

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

Merged
barneygale merged 3 commits into
python:mainfrom
barneygale:gh-127381-dregs
Dec 12, 2024
Merged

GH-127381: pathlib ABCs: remove remaining uncommon PathBase methods#127714
barneygale merged 3 commits into
python:mainfrom
barneygale:gh-127381-dregs

Conversation

@barneygale

@barneygalebarneygale commented Dec 7, 2024

Copy link
Copy Markdown
Contributor

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:mainDec 12, 2024
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 freeto 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

@barneygale@carlos2martinize