[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

Steve Dower report at bugs.python.org
Wed Sep 9 11:57:24 EDT 2020


Steve Dower <steve.dower at python.org> added the comment:

In general, if a bug here appears to be inactive, it's probably waiting on someone to volunteer to move it forward. Often merely posting to a thread is enough.

For this case, I think the best thing we can probably do is change the default share mode for _all_ opens to include FILE_SHARE_DELETE. This would also help a number of other situations, as well as bringing the default Windows behaviour slightly more in line with how POSIX likes to do things.

As far as I'm aware this would only be harmful in cases where people are trying to implicitly lock files on Windows by keeping an open handle, and are using a different code path on other platforms where that won't work.

----------
versions: +Python 3.10 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14243>
_______________________________________


More information about the Python-bugs-list mailing list