Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
There was a problem hiding this 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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2024-11-29-00-15-59.gh-issue-125413.WCN0vv.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@zooba would you mind if I tackle removing |
Sure. Provided it's not part of the public/subclassing interface, I'm happy. |
…CN0vv.rstCo-authored-by: Steve Dower <steve.dower@microsoft.com>
8b3cccf
intopython:mainUh oh!
There was an error while loading.Please reload this page.
…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>
Uh oh!
There was an error while loading.Please reload this page.
Remove documentation for
pathlib.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
os.DirEntry
objects from pathlib #125413📚 Documentation preview 📚:https://cpython-previews--127377.org.readthedocs.build/