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-16.00:12:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368663133.36.0.360138058169.issue8604@psf.upfronthosting.co.za>
In-reply-to
Content
> Here's the part of the code that does the open/close part:
> http://bazaar.launchpad.net/~exabyte/blackherd/async-refactor/view/61/blackherd/misc.py#L498

This code contains a bug: hasattr('os', 'fsync') is never True :-)

This part is interesting:

        # fsync on Mac OS X doesn't work, it requires using the
        # F_FULLSYNC fcntl
        if hasattr(fcntl, 'F_FULLFSYNC'):
            fcntl.fcntl(self._fd, fcntl.F_FULLFSYNC)

=> see also #11877

> http://trac.edgewall.org/browser/trunk/trac/util/__init__.py?#L145

This class copies file owner, permissions, flags, etc. atomic_write() should probably also call copystat() on the temporary file.
History
Date User Action Args
2013-05-16 00:12:13vstinnersetrecipients: + vstinner, loewis, barry, exarkun, ncoghlan, pitrou, eric.smith, giampaolo.rodola, tarek, eric.araujo, olemis, meatballhat, milko.krachounov, neologix, martin.panter
2013-05-16 00:12:13vstinnersetmessageid: <1368663133.36.0.360138058169.issue8604@psf.upfronthosting.co.za>
2013-05-16 00:12:13vstinnerlinkissue8604 messages
2013-05-16 00:12:13vstinnercreate