]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-78722: Raise exceptions from `pathlib.Path.iterdir()` without delay. (#107320)
authorBarney Gale <barney.gale@gmail.com>
Sat, 2 Sep 2023 15:08:03 +0000 (16:08 +0100)
committerGitHub <noreply@github.com>
Sat, 2 Sep 2023 15:08:03 +0000 (16:08 +0100)
commitbdc3c884cdc90102ad68b6b55dc9b988e729ae35
treedf837954084737e01fc497f7f3091066f708b4db
parent594b00057e667e0d8d4e41748be056cdd829e919
GH-78722: Raise exceptions from `pathlib.Path.iterdir()` without delay. (#107320)

`pathlib.Path.iterdir()` now immediately raises any `OSError`
exception from `os.listdir()`, rather than waiting until its
result is iterated over.
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-07-26-22-52-48.gh-issue-78722.6SKBLt.rst [new file with mode: 0644]