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 vstinner
Recipients Trundle, giampaolo.rodola, tarek, vstinner
Date 2010-05-27.10:32:38
SpamBayes Score 0.00022437196
Marked as misclassified No
Message-id <1274956361.36.0.377096569346.issue8828@psf.upfronthosting.co.za>
In-reply-to
Content
We have to think about network file systems like NFS. Gnome (nautilus) had a bug on rename because NFS emitted a delete notification on a rename:
http://linux-nfs.org/pipermail/nfsv4/2009-March/010134.html
https://bugzilla.gnome.org/show_bug.cgi?id=575684

It looks like rename is atomic, it's just a bug about notification. But other virtual file systems may not implement atomic rename (eg. is rename atomic with sshfs?). Should Python detect the file system type to choose the algorithm? I would like to say no, because I consider that as a file system (or kernel) bug, not a Python bug.

--

Should we also implement a atomic version of shutil.move()? Support rename if the source and the destination are on different file systems. Or is shutil.move() already atomic?

Note: this issue is only about renaming a *file*. Atomic rename of a directory is much more complex :-)
History
Date User Action Args
2010-05-27 10:32:41vstinnersetrecipients: + vstinner, giampaolo.rodola, tarek, Trundle
2010-05-27 10:32:41vstinnersetmessageid: <1274956361.36.0.377096569346.issue8828@psf.upfronthosting.co.za>
2010-05-27 10:32:39vstinnerlinkissue8828 messages
2010-05-27 10:32:38vstinnercreate