Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-07 Thread Ian Charnas
OK I finished a patch that exposes os.fullfsync on platforms that support it, and I added the corresponding documentation in Doc/library/os.rst Any comments? http://bugs.python.org/issue3517 -ian On Thu, Aug 7, 2008 at 10:17 AM, Ian Charnas <[EMAIL PROTECTED]> wrote: > Excellent comments, every

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-07 Thread Ian Charnas
Excellent comments, everyone. It looks like I didn't know the full situation, thanks scott for pointing me towards that email on darwin-dev. The email said that fsync on OS X does indeed force a flush from the operating system to the hard drive (so my earlier understanding was incorrect), but da

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-07 Thread Martin v. Löwis
> I can't think of a situation where it would be useful to do an fsync() > in which you don't want the data to be flushed as far as possible. Essentially, you are saying that you don't see a use for fsync. If that's the case, then this API should be removed from Python completely. As all others h

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-06 Thread Scott Dial
Richard Boulton wrote: I can't think of a situation where it would be useful to do an fsync() in which you don't want the data to be flushed as far as possible. If you're bothering to call fsync(), it's presumably because you need to guarantee that the data will be in a consistent state in the

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-06 Thread Richard Boulton
James Y Knight wrote: On Aug 7, 2008, at 12:36 AM, Ian Charnas wrote: While some people might suggest that fullfsync should be exposed as a method on the 'os' module for platforms that support it, I believe this is not the best approach. Because the docstring for os.fsync says that it forces th

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-06 Thread James Y Knight
On Aug 7, 2008, at 12:36 AM, Ian Charnas wrote: Hello heroes and heroins of the python universe, lend me your ears and I will tell you a tale that will make your platters spin! As noted by SQLite [1] and MySQL [2] developers, fsync on OS X does not actually flush a file to disk... instead OS X

Re: [Python-Dev] small PATCH to fix os.fsync on OS X

2008-08-06 Thread Scott Dial
Ian Charnas wrote: As noted by SQLite [1] and MySQL [2] developers, fsync on OS X does not actually flush a file to disk... instead OS X provides "fullfsync" which actually flushes the file descriptor to disk. This simple patch modifies python's "fsync" to take advantage of fullfsync on platform