Skip to content

Commit ada51b0

Browse files
committed
Add OSError suppression note to Path.rglob() docs
1 parent df86064 commit ada51b0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Doc/library/pathlib.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,11 @@ Reading directories
13911391
.. versionchanged:: 3.13
13921392
The *pattern* parameter accepts a :term:`path-like object`.
13931393

1394+
.. versionchanged:: 3.13
1395+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
1396+
suppressed. In previous versions, such exceptions are suppressed in many
1397+
cases, but not all.
1398+
13941399

13951400
.. method:: Path.walk(top_down=True, on_error=None, follow_symlinks=False)
13961401

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Document that :func:`glob.glob` and :func:`glob.iglob` silently suppress
2-
:exc:`OSError` exceptions raised from scanning the filesystem.
1+
Document that :func:`glob.glob`, :func:`glob.iglob`, and
2+
:meth:`pathlib.Path.rglob` silently suppress :exc:`OSError` exceptions
3+
raised from scanning the filesystem.

0 commit comments

Comments
 (0)