This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Guido.van.Rossum, eryksun, jkloth, pablogsal, paul.moore, shreyanavigyan, steve.dower, tim.golden, tim.peters, vstinner, zach.ware
Date 2021-04-29.20:49:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619729349.85.0.494542292945.issue37387@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-04-29 20:49:09eryksunsetrecipients: + eryksun, tim.peters, paul.moore, vstinner, tim.golden, jkloth, zach.ware, steve.dower, Guido.van.Rossum, pablogsal, shreyanavigyan
2021-04-29 20:49:09eryksunsetmessageid: <1619729349.85.0.494542292945.issue37387@roundup.psfhosted.org>
2021-04-29 20:49:09eryksunlinkissue37387 messages
2021-04-29 20:49:09eryksuncreate