Skip to content

Commit 0fff068

Browse files
[3.12] gh-83006: Document behavior of shutil.disk_usage for non-mounted filesystems on Unix (GH-107031) (#107047)
(cherry picked from commit 6e5f223) Co-authored-by: Matthieu Caneill <[email protected]>
1 parent 3889d39 commit 0fff068

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
@@ -399,6 +399,12 @@ Directory and files operations
399399
total, used and free space, in bytes. *path* may be a file or a
400400
directory.
401401

402+
.. note::
403+
404+
On Unix filesystems, *path* must point to a path within a **mounted**
405+
filesystem partition. On those platforms, CPython doesn't attempt to
406+
retrieve disk usage information from non-mounted filesystems.
407+
402408
.. versionadded:: 3.3
403409

404410
.. 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)