Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-125413: Revert addition ofpathlib.Path.scandir() method#127377

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 4 commits intopython:mainfrombarneygale:scandir-revert
Dec 5, 2024

Conversation

barneygale
Copy link
Contributor

@barneygalebarneygale commentedNov 29, 2024
edited by github-actionsbot
Loading

Remove documentation forpathlib.Path.scandir(), and rename the method to_scandir(). In the private pathlib ABCs, makeiterdir() abstract and call it from_scandir().

It's not worthwhile to add this method at the moment - see discussion:https://discuss.python.org/t/ergonomics-of-new-pathlib-path-scandir/71721


📚 Documentation preview 📚:https://cpython-previews--127377.org.readthedocs.build/

Remove documentation for `pathlib.Path.scandir()`, and rename the method to`_scandir()`. In the private pathlib ABCs, make `iterdir()` abstract andcall it from `_scandir()`.It's not worthwhile to add this method at the moment - see discussion:https://discuss.python.org/t/ergonomics-of-new-pathlib-path-scandir/71721
Copy link
Member

@zoobazooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Sorry, I think we need a bit more code duplication in order to keep subclassing reliable.

barneygale reacted with thumbs up emoji
@barneygale
Copy link
ContributorAuthor

@zooba would you mind if I tackle removing_scandir() in a follow-up PR?

@zooba
Copy link
Member

Sure. Provided it's not part of the public/subclassing interface, I'm happy.

barneygaleand others added2 commitsDecember 5, 2024 21:11
…CN0vv.rstCo-authored-by: Steve Dower <steve.dower@microsoft.com>
@barneygalebarneygaleenabled auto-merge (squash)December 5, 2024 21:36
@barneygalebarneygale merged commit8b3cccf intopython:mainDec 5, 2024
42 checks passed
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
…ython#127377)Remove documentation for `pathlib.Path.scandir()`, and rename the method to`_scandir()`. In the private pathlib ABCs, make `iterdir()` abstract andcall it from `_scandir()`.It's not worthwhile to add this method at the moment - see discussion:https://discuss.python.org/t/ergonomics-of-new-pathlib-path-scandir/71721Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@zoobazoobazooba approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@barneygale@zooba

[8]ページ先頭

©2009-2025 Movatter.jp