STINNER Victor added the comment: > 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8604> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com