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 eryksun
Recipients Eduardo.Seabra, berker.peksag, eryksun, georg.brandl, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, socketpair, vstinner
Date 2015-12-31.06:11:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451542310.81.0.416994807028.issue21579@psf.upfronthosting.co.za>
In-reply-to
Content
For anyone interested, this issue is solvable on Windows by working around how O_TEMPORARY is implemented. To do this the _winapi module would need a wrapper for SetFileInformationByHandle (available in Vista+), which would need to support at least FileDispositionInfo. 

That said, the use case of replacing a file is better supported by calling the Windows API function ReplaceFile anyway. It isn't atomic, however. I don't think that's possible in general on Windows. The problem is that, unlike on Unix, an open file on Windows can't be anonymous. So if the replaced file is already open, it has to first be renamed before the replacement file can take its place. That creates a small window for things to go wrong.
History
Date User Action Args
2015-12-31 06:11:51eryksunsetrecipients: + eryksun, georg.brandl, ncoghlan, pitrou, vstinner, r.david.murray, socketpair, berker.peksag, serhiy.storchaka, Eduardo.Seabra
2015-12-31 06:11:50eryksunsetmessageid: <1451542310.81.0.416994807028.issue21579@psf.upfronthosting.co.za>
2015-12-31 06:11:50eryksunlinkissue21579 messages
2015-12-31 06:11:50eryksuncreate