This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fireattack
Recipients fireattack
Date 2021-01-14.21:29:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
According to

"If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics."

I interpret "depending on os.rename() semantics" to mean it will follow os.rename()'s behavior.

According to

"On Windows, if dst exists a FileExistsError is always raised."

However, their behaviors are not the same.

For os.rename, it does raise FileExistsError if dst exists.
For shutil.move, it silently overwrites dst.

It's either a bug in behavior of shutil.move, or the documentation need to be updated.
Date User Action Args
2021-01-14 21:29:10fireattacksetrecipients: + fireattack
2021-01-14 21:29:10fireattacksetmessageid: <>
2021-01-14 21:29:10fireattacklinkissue42929 messages
2021-01-14 21:29:09fireattackcreate