[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2021-03-12 Thread Eryk Sun
Eryk Sun added the comment: Deleting a file in Windows 10 has been updated to try a POSIX-style delete. For a POSIX delete, the filesystem unlinks the file even it's open, whereas a classic delete only unlinks a 'deleted' file when it's closed. The filesystem has to support it. NTFS does, wh

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2015-03-24 Thread eryksun
eryksun added the comment: > you can't mix CRT methods with OS methods because the CRT does its > own buffering Python 3's io uses the CRT's low I/O (ioinfo struct) in binary mode. It appears that the buffers pipech, pipech2, and dbcsbuffer are only used in text mode. So it should be generall

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: "opener" was new in 3.3, so I suspect it didn't come up because *we're* still not entirely accustomed to having it available yet :) I agree providing a suitable opener could be a good way to go. -- ___ Python tracker

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-03 Thread Steve Dower
Steve Dower added the comment: As much as I like the idea of using OS handles everywhere, the compatibility issues are probably too significant, and you can't mix CRT methods with OS methods because the CRT does its own buffering. Of course, you can open a file with the Win32 API and immediate

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: How do we take this forward, also considering #12939, #21859 and #14243 and possibly others? -- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 14/03/2013 1:00pm, Martin v. Löwis wrote: > That's why I was asking for an actual patch. The proposed change may > well not be implementable. If os.open continues to create CRT handles, > a way needs to be found to get a CRT handle that as the > FILE_SHARE_DE

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 14.03.13 03:31, schrieb Piotr Dobrogost: > forces programs which would like to open a file being opened at the > same time by Python code (by means of built-in open() or os.open() > with default arguments) to either use O_TEMPORARY when using msvcrt > or to g

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: > I don't understand whether you are proposing to include the patch into Python > as-is; I think Richard is well aware of the constraints you specify and current patch was meant as a proof of concept; to show that all tests pass with such a change. Of course

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't understand whether you are proposing to include the patch into Python as-is; if so, I'm -1 on it for two formal reasons: a) the standard library shouldn't monkey patch itself, and b) OS interfacing should be implemented in C. That said, having maximum

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: Actually, it is not quite the same semantics as Unix. After you delete the the file you cannot create a file of the same name or delete the directory which contains it until the handle has been closed. However, one can work around that by moving the file some

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-13 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +dabrahams, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-13 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: Having the same semantics on both Unix and Windows with regard to validity of file handle after a file was deleted would be a very nice to have. How could we progress this? I'm adding Martin and Antoine to cc list. -- nosy: +loewis, pitrou _

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-06 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2012-07-03 Thread Richard Oudkerk
New submission from Richard Oudkerk : On Unix, files (unless specifically locked) can be renamed and deleted while file descriptors for the file remain open. The file descriptors remain valid even after deletion of the file. On Windows this is not possible for files opened using io.open() or