From f7c10a5204cb1ea88179535419d0b6142fdfeb22 Mon Sep 17 00:00:00 2001 From: Ryan Ozawa Date: Mon, 9 Jan 2023 13:43:09 -0800 Subject: [PATCH] bpo-28356: Document os.rename() behavior on Windows for differing volumes (GH-27376) (cherry picked from commit e098137cd3250af05f19380590b8dec79dc5942f) Co-authored-by: Ryan Ozawa --- Doc/library/os.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 7a5efcf5d79b4d..e5fc63afdcf57a 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2302,6 +2302,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