[New-bugs-announce] [issue25024] Allow passing "delete=False" to TemporaryDirectory

Antony Lee report at bugs.python.org
Tue Sep 8 07:36:20 CEST 2015


New submission from Antony Lee:

I would like to suggest allowing passing "delete=False" to the TemporaryDirectory constructor, with the effect that the directory is not deleted when the TemporaryDirectory context manager exits, or when the TemporaryDirectory object is deleted.

I realize that this would effectively duplicate the functionality of mkdtemp, but this is similar to the redundancy between NamedTemporaryFile(delete=False) and mkstemp, and would make it easier to switch between the two behaviors (which is useful e.g. when debugging, where you may need to look at the temporary files "post-mortem").

----------
components: Library (Lib)
messages: 250158
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Allow passing "delete=False" to TemporaryDirectory
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25024>
_______________________________________


More information about the New-bugs-announce mailing list