[issue4928] tempfile.NamedTemporaryFile: automatic cleanup by OS

Hugo report at bugs.python.org
Tue Jul 21 04:47:35 EDT 2020


Hugo <hugo at barrera.io> added the comment:

It would seem that the main issue here lies in the documentation not being  obvious enough for some of us. If you're familiar with lower level OS APIs, it might be clear, but as an app developer, some things slip by.

The key difference is that TemporaryFile will be erased properly (at least on Linux) even if the process gets a SIGKILL, while NamedTemporaryFile will linger (which fills up my disk every few weeks/months).

As an application developer, this difference is super important to me (I hope I'm not the only one). Would a PR that mentions this explicitly in the docs be an acceptable solution here?

----------
nosy: +WhyNotHugo

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


More information about the Python-bugs-list mailing list