]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-125413: Revert addition of `pathlib.Path.scandir()` method (#127377)
authorBarney Gale <barney.gale@gmail.com>
Thu, 5 Dec 2024 21:39:43 +0000 (21:39 +0000)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2024 21:39:43 +0000 (21:39 +0000)
commit8b3cccf3f9508572d85b0044519f2bd5715dacad
tree9c5e6a23fa26ef59fa0db986ccf9bf4a1bd3a9a2
parentf4f530804b9d8f089eba0f157ec2144c03b13651
GH-125413: Revert addition of `pathlib.Path.scandir()` method (#127377)

Remove documentation for `pathlib.Path.scandir()`, and rename the method to
`_scandir()`. In the private pathlib ABCs, make `iterdir()` 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

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Doc/library/pathlib.rst
Doc/whatsnew/3.14.rst
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib_abc.py
Misc/NEWS.d/3.14.0a2.rst
Misc/NEWS.d/next/Library/2024-11-29-00-15-59.gh-issue-125413.WCN0vv.rst [new file with mode: 0644]