Re: [Python-Dev] os.rename on windows

2007-05-01 Thread Raghuram Devarakonda
On 5/1/07, Scott Dial <[EMAIL PROTECTED]> wrote: > The cygwin implementation of rename goes like this: > > 1) Try to use MoveFile > 2) Try to use MoveFileEx(..., MOVEFILE_REPLACE_EXISTING) > 3) Try to unlink destination, then try to use MoveFile > > And as you say, Cygwin claims it meets POSIX.1.

Re: [Python-Dev] os.rename on windows

2007-05-01 Thread Scott Dial
Raghuram Devarakonda wrote: > As a last resort, I > checked cygwin documentation which claims that it's rename() is > POSIX.1 compliant. If I am not mistaken, POSIX.1 does require > atomicity so I am curious how rename() is implemented there. The cygwin implementation of rename goes like this: 1)

Re: [Python-Dev] os.rename on windows

2007-04-30 Thread Raghuram Devarakonda
On 4/30/07, Andrew Bennetts <[EMAIL PROTECTED]> wrote: > Does MOVEFILE_REPLACE_EXISTING mean the rename over an existing file is > actually > atomic? I cannot find any MSDN docs that say so (and I've seen some that > suggest to me that it probably isn't). Even though MSDN docs do not say it exp

Re: [Python-Dev] os.rename on windows

2007-04-30 Thread Andrew Bennetts
Raghuram Devarakonda wrote: > Hi, > > I have submitted a patch (http://www.python.org/sf/1704547) that > allows os.rename to replace the destination file if it exists, on > windows. As part of discussion in the tracker, Martin suggested that > python-dev should discuss the change. Does MOVEFILE_R