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 taleinat
Recipients Michael.Felt, Tom Hale, a.badger, eryksun, rbcollins, serhiy.storchaka, taleinat
Date 2019-06-27.08:35:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561624541.31.0.445077127928.issue36656@roundup.psfhosted.org>
In-reply-to
Content
I think there is a general flaw with the suggested implementation approach.

An infinite loop as currently suggested seems dangerous to me.  For example, it could cause a program to stall indefinitely in some unforeseen edge-case.  I don't think this would be acceptable for something in the stdlib.

On the other hand, limiting this loop to a finite number of attempts would re-introduce the necessity of handling the case where creating the symlink fails. Users of the function would still need to deal with this case (or risk unhandled exceptions).

In either case, this wouldn't give users the simplicity and peace of mind that a truly atomic operation would.  ISTM that only using actually atomic operations, as provided by the underlying file system and/or OS, would allow us to provide that.

Given the above, I must say that I don't see this providing enough utility to justify inclusion in the stdlib, unless a better implementation approach can be found.
History
Date User Action Args
2019-06-27 08:35:41taleinatsetrecipients: + taleinat, rbcollins, a.badger, serhiy.storchaka, eryksun, Michael.Felt, Tom Hale
2019-06-27 08:35:41taleinatsetmessageid: <1561624541.31.0.445077127928.issue36656@roundup.psfhosted.org>
2019-06-27 08:35:41taleinatlinkissue36656 messages
2019-06-27 08:35:40taleinatcreate