[New-bugs-announce] [issue34157] NamedTemporaryFile can leave temporary files behind
Jakub Wilk
report at bugs.python.org
Thu Jul 19 15:29:32 EDT 2018
New submission from Jakub Wilk <jwilk at jwilk.net>:
If you press Ctrl+C at the wrong moment, NamedTemporaryFile won't delete the
temporary file. To reproduce, you can try this script:
import tempfile
while True:
with tempfile.NamedTemporaryFile(dir='.'):
pass
I get a stray temporary file when I press Ctrl+C about 40% of the time.
----------
components: Library (Lib)
messages: 321965
nosy: jwilk
priority: normal
severity: normal
status: open
title: NamedTemporaryFile can leave temporary files behind
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34157>
_______________________________________
More information about the New-bugs-announce
mailing list