Skip to content
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

GH-127381: pathlib ABCs: remove PathBase.stat() #128334

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Dec 29, 2024

Remove the PathBase.stat() method. Its use of the os.stat_result API, with its 10 mandatory fields and low-level types, makes it an awkward fit for virtual filesystems.

We'll look to add a PathBase.info attribute later - see GH-125413.

No user-facing changes because the ABCs are still private.

Remove the `PathBase.stat()` method. Its use of the `os.stat_result` API,
with its 10 mandatory fields and low-level types, makes it a poor fit for
virtual filesystems.

We'll look to add a `PathBase.info` attribute later - see pythonGH-125413.
@barneygale barneygale enabled auto-merge (squash) December 29, 2024 20:51
@barneygale barneygale merged commit c78729f into python:main Dec 29, 2024
36 checks passed
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
Remove the `PathBase.stat()` method. Its use of the `os.stat_result` API,
with its 10 mandatory fields and low-level types, makes it an awkward fit
for virtual filesystems.

We'll look to add a `PathBase.info` attribute later - see pythonGH-125413.
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