Evgeny <ev2g...@gmail.com> added the comment:
>Eryk Sun <eryk...@gmail.com> added the comment: >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. At the moment, the TemporaryFile directly reuses NamedTemporaryFile for none-posix or cygwin systems. https://github.com/python/cpython/blob/a92d7387632de1fc64de51f22f6191acd0c6f5c0/Lib/tempfile.py#L552 Does it mean, that your suggestion to leave the O_TEMPORARY for TemporaryFile means, that NamedTemporaryFile needs to have a mechanism to know whether it was called as a TemporaryFile and then to have a different functionality in this case relative to the situation it would be called directly? ---------- _______________________________________ 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