Eryk Sun <eryk...@gmail.com> added the comment:

> What is the name of the new function introduced in Windows 10 NT API? 
> Should we use it if the version is detected as Windows 10 (through a
> callback to a platform function or through GetVersion API)?

No, _bootstrap_external._write_atomic() or py_compile.compile() could implement 
the typical retry with exponential backoff to address a race condition. 
Otherwise I don't see what could be done currently in the main code. It would 
have to be addressed in the test code.

Regarding the new support for POSIX semantics, the base NT API isn't organized 
as a separate function for every operation or query, so it's not a new function 
name per se. Each kernel object type (e.g. File) has many information classes 
and a few query/set functions such as NtQueryInformationFile() and 
NtSetInformationFile(). Windows 10 added file information classes that support 
the ability to replace/unlink an open file, including FileLinkInformationEx 
(link), FileRenameInformationEx (relink), and FileDispositionInformationEx 
(unlink). WinAPI DeleteFileW() and RemoveDirectoryW() were updated to use the 
latter. I expect that CreateHardlinkW() and MoveFileExW() will be updated as 
well. It's only POSIX-'ish' semantics because the shared read-write-delete 
model is deeply ingrained in the NT file API. Opens have to opt in by sharing 
delete access, and most don't.

----------

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

Reply via email to