From 7683169fcabdfdfda358413af602716d58d146ee Mon Sep 17 00:00:00 2001 From: Ryan Ozawa Date: Sun, 25 Jul 2021 17:20:52 -0700 Subject: [PATCH 1/4] add initial changes to os.rename for Windows behavior --- Doc/library/os.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 59173d49936e8a..2f20d3be43836d 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2292,6 +2292,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 will 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 From b27800557ce01219a7af169bc34b1f9af2a70f74 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 26 Jul 2021 19:57:22 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst diff --git a/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst b/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst new file mode 100644 index 00000000000000..5e4f47f201c068 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst @@ -0,0 +1 @@ +The documentation about os.rename() used on Windows systems updated to reflect behavior about moving across filesystems. Patch by Ryan Ozawa \ No newline at end of file From 2883af8f033d7103321e13b5559bae6b49c9afc7 Mon Sep 17 00:00:00 2001 From: Ryan Ozawa Date: Mon, 26 Jul 2021 17:29:49 -0700 Subject: [PATCH 3/4] Remove typo --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 2f20d3be43836d..0edaf2de74da69 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2293,7 +2293,7 @@ features: On Windows, if *dst* exists a :exc:`FileExistsError` is always raised. The operation will fail if *src* and *dst* are on different filesystems. Use -+ :func:`shutil.move` to support moves to a different filesystem. + :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 From 536d2416460b56c133d4539d557282c7f8d435c9 Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Sat, 24 Dec 2022 10:20:34 -0800 Subject: [PATCH 4/4] Change "will" to "may"; remove news --- Doc/library/os.rst | 2 +- .../next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 0edaf2de74da69..b3814d0d0863ab 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2292,7 +2292,7 @@ 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 will fail if *src* and *dst* are on different filesystems. Use + 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 diff --git a/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst b/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst deleted file mode 100644 index 5e4f47f201c068..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2021-07-26-19-57-21.bpo-28356._F5a04.rst +++ /dev/null @@ -1 +0,0 @@ -The documentation about os.rename() used on Windows systems updated to reflect behavior about moving across filesystems. Patch by Ryan Ozawa \ No newline at end of file