[issue28867] NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile)
SilentGhost
report at bugs.python.org
Sun Dec 4 13:49:41 EST 2016
SilentGhost added the comment:
Looking at the code it seems NamedTemporaryFile is closed on destruction of the object, so there is no need for ResourceWarning, because the file descriptor is not leaking.
You also don't need to involve unittest here. Just running python with -Wall would generate a warning if there is a need for one.
----------
nosy: +SilentGhost
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28867>
_______________________________________
More information about the Python-bugs-list
mailing list