Eryk Sun <eryk...@gmail.com> 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, which is the most important because the system 
drive is NTFS. This makes supporting FILE_SHARE_DELETE a more attractive 
option. 

That said, there are sill significant limits. Memory-mapped files can't be 
deleted (renamed, yes, but not removed). Also, most programs don't share delete 
access on their opens, which means they can't open a file that's currently open 
with delete access (e.g. NamedTemporaryFile), and their open files can't be 
deleted.

----------
components: +IO, Windows -Library (Lib)
nosy: +paul.moore
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue15244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to