Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-28356: Document os.rename() behavior on Windows for differing vol…
…umes (GH-27376)

(cherry picked from commit e098137)

Co-authored-by: Ryan Ozawa <ryan.ozawa21@gmail.com>
  • Loading branch information
rhyn0 authored and miss-islington committed Jan 9, 2023
commit f7c10a5204cb1ea88179535419d0b6142fdfeb22
2 changes: 2 additions & 0 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down