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

> deleting on CM exit when used as a CM, and no change in behaviour 
> otherwise (me, Zachary, Ethan, Jason and Steve). Steve also wants
> O_TEMPORARY to be removed, which doesn't seem controversial among
> this group of people.

Removing O_TEMPORARY is not an afterthought here. It is the core of this issue. 
The O_TEMPORARY flag MUST NOT be used if the goal is to make 
NamedTemporaryFile() "particularly useful on Windows". A file that's opened 
with DELETE access cannot be reopened in most cases, because most opens do not 
share delete access, but it also can't be closed to allow it to be reopened 
because the OS will delete it.

I replied twice that I thought using the CM exit instead of O_TEMPORARY is okay 
for NamedTemporaryFile() -- but only if a separate implementation of 
TemporaryFile() that uses O_TEMPORARY is added at the same time. I want 
guaranteed cleanup for TemporaryFile() since it's not intended to be reopened.

----------

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

Reply via email to