[Python-checkins] bpo-28356: Document os.rename() behavior on Windows for differing volumes (GH-27376)
zooba
webhook-mailer at python.org
Mon Jan 9 16:43:15 EST 2023
https://github.com/python/cpython/commit/e098137cd3250af05f19380590b8dec79dc5942f
commit: e098137cd3250af05f19380590b8dec79dc5942f
branch: main
author: Ryan Ozawa <ryan.ozawa21 at gmail.com>
committer: zooba <steve.dower at microsoft.com>
date: 2023-01-09T21:43:09Z
summary:
bpo-28356: Document os.rename() behavior on Windows for differing volumes (GH-27376)
files:
M Doc/library/os.rst
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index b06f9bbcd831..fb091176767f 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2467,6 +2467,8 @@ features:
will fail with an :exc:`OSError` subclass in a number of cases:
On Windows, if *dst* exists a :exc:`FileExistsError` is always raised.
+ The operation may fail if *src* and *dst* are on different filesystems. Use
+ :func:`shutil.move` to support moves to a different filesystem.
On Unix, if *src* is a file and *dst* is a directory or vice-versa, an
:exc:`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised
More information about the Python-checkins
mailing list