[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

Ethan Furman report at bugs.python.org
Mon Apr 12 16:46:51 EDT 2021


Ethan Furman <ethan at stoneleaf.us> added the comment:

Paul,

If "rescuing"  (i.e. "fixing" ;) NamedTemporaryFile was arduous, complicated, or had serious backwards-compatibility issues then I would completely agree with you.  However, the fix is simple, the only backwards-compatible issue is the file would still be there /while a context manager was in use/ after it had been closed (which conforms to most, if not all, users of context managers) and a file would be left on disk in the event of a hard crash (hopefully a rare occurrence).

Your proposal, on the other, is a lot of work.  Is the minor backwards compatibility worth all that work?

----------

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


More information about the Python-bugs-list mailing list