This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee
Date 2015-09-08.05:36:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441690580.39.0.270846340544.issue25024@psf.upfronthosting.co.za>
In-reply-to
Content
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").
History
Date User Action Args
2015-09-08 05:36:20Antony.Leesetrecipients: + Antony.Lee
2015-09-08 05:36:20Antony.Leesetmessageid: <1441690580.39.0.270846340544.issue25024@psf.upfronthosting.co.za>
2015-09-08 05:36:20Antony.Leelinkissue25024 messages
2015-09-08 05:36:19Antony.Leecreate