◐ Shell
clean mode source ↗

GH-90208: Suppress OSError exceptions from `pathlib.Path.glob()` by barneygale · Pull Request #104141 · python/cpython

`pathlib.Path.glob()` now suppresses all OSError exceptions, except
those raised from calling `is_dir()` on the top-level path.

Previously, `glob()` suppressed ENOENT, ENOTDIR, EBADF and ELOOP
errors and their Windows equivalents. PermissionError was also
suppressed unless it occurred when calling `is_dir()` on the
top-level path. However, the selector would abort prematurely
if a PermissionError was raised, and so `glob()` could return
incomplete results.

@barneygale barneygale changed the title GH-90208 - Suppress OSError exceptions from pathlib.Path.glob() GH-90208: Suppress OSError exceptions from pathlib.Path.glob()

May 4, 2023

@barneygale

@barneygale

JelleZijlstra

carljm added a commit to carljm/cpython that referenced this pull request

May 11, 2023

carljm added a commit to carljm/cpython that referenced this pull request

May 11, 2023