]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-83006: Document behavior of `shutil.disk_usage` for non-mounted filesystems...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 22 Jul 2023 18:25:15 +0000 (11:25 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2023 18:25:15 +0000 (20:25 +0200)
(cherry picked from commit 6e5f2235f3754307292c7d8d3698958136b5e311)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
Doc/library/shutil.rst
Misc/NEWS.d/next/Library/2023-07-22-15-51-33.gh-issue-83006.21zaCz.rst [new file with mode: 0644]

index 26a5cd531fa14f32198aef671298f899026d7269..dcf421f162b15a9a5bb5b039eb0a31e6d2ad1b56 100644 (file)
@@ -393,6 +393,12 @@ Directory and files operations
    total, used and free space, in bytes. *path* may be a file or a
    directory.
 
+   .. note::
+
+      On Unix filesystems, *path* must point to a path within a **mounted**
+      filesystem partition. On those platforms, CPython doesn't attempt to
+      retrieve disk usage information from non-mounted filesystems.
+
    .. versionadded:: 3.3
 
    .. versionchanged:: 3.8
diff --git a/Misc/NEWS.d/next/Library/2023-07-22-15-51-33.gh-issue-83006.21zaCz.rst b/Misc/NEWS.d/next/Library/2023-07-22-15-51-33.gh-issue-83006.21zaCz.rst
new file mode 100644 (file)
index 0000000..e64d186
--- /dev/null
@@ -0,0 +1,2 @@
+Document behavior of :func:`shutil.disk_usage` for non-mounted filesystems
+on Unix.