Skip to content

Commit 2895dbd

Browse files
[3.11] gh-83006: Document behavior of shutil.disk_usage for non-mounted filesystems on Unix (GH-107031) (#107048)
(cherry picked from commit 6e5f223) Co-authored-by: Matthieu Caneill <[email protected]>
1 parent e5d2a19 commit 2895dbd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/library/shutil.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ Directory and files operations
393393
total, used and free space, in bytes. *path* may be a file or a
394394
directory.
395395

396+
.. note::
397+
398+
On Unix filesystems, *path* must point to a path within a **mounted**
399+
filesystem partition. On those platforms, CPython doesn't attempt to
400+
retrieve disk usage information from non-mounted filesystems.
401+
396402
.. versionadded:: 3.3
397403

398404
.. versionchanged:: 3.8
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Document behavior of :func:`shutil.disk_usage` for non-mounted filesystems
2+
on Unix.

0 commit comments

Comments
 (0)