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 barry, eric.araujo, eric.smith, exarkun, giampaolo.rodola, loewis, martin.panter, meatballhat, milko.krachounov, ncoghlan, neologix, olemis, pitrou, tarek, vstinner
Date 2013-05-15.23:50:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
atomic_write.patch calls os.replace(src, dst) whereas the src file is open. It works on Linux, but it sounds a little bit strange to me and may fail on other platforms.

Here is another patch (atomic_write_mkstemp.patch) using tempfile.mkstemp() instead of tempfile.NamedTemporaryFile(delete=True) to control when the file is closed and removed.
Date User Action Args
2013-05-15 23:50:03vstinnersetrecipients: + vstinner, loewis, barry, exarkun, ncoghlan, pitrou, eric.smith, giampaolo.rodola, tarek, eric.araujo, olemis, meatballhat, milko.krachounov, neologix, martin.panter
2013-05-15 23:50:03vstinnersetmessageid: <>
2013-05-15 23:50:03vstinnerlinkissue8604 messages
2013-05-15 23:50:03vstinnercreate