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 r.david.murray
Recipients Trundle, draghuram, eric.araujo, giampaolo.rodola, neologix, pitrou, r.david.murray, tarek, techtonik, vstinner
Date 2011-12-23.20:04:27
SpamBayes Score 2.7332776e-08
Marked as misclassified No
Message-id <>
So maybe my warning idea isn't such a bad idea :)

As a unix programmer, I was very surprised to read in this thread that Windows doesn't overwrite the file on rename.  As a unix programmer, I don't check for errors on a rename, because I expect it to just work.  I'd like the windows rename call to stop throwing errors if the file exists, it breaks my programs if they run on windows.

(Actually, very few of my programs ever get run on Windows, but you get the idea.)

Thus, the only possible course is to maintain backward compatibility, and allow the programmers who care to specify the desired behavior.  Since one of the important aspects of 'rename' in unix programmers' minds is that it is atomic, a race condition is not acceptable, therefore overwrite=False is not an acceptable option for os.rename.
Date User Action Args
2011-12-23 20:04:28r.david.murraysetrecipients: + r.david.murray, pitrou, vstinner, draghuram, techtonik, giampaolo.rodola, tarek, eric.araujo, Trundle, neologix
2011-12-23 20:04:28r.david.murraysetmessageid: <>
2011-12-23 20:04:27r.david.murraylinkissue8828 messages
2011-12-23 20:04:27r.david.murraycreate