New submission from Jakub Wilk <jw...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue34157> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com