Giampaolo Rodola' <g.rod...@gmail.com> added the comment:

> in case a filesystem has been mounted on the temporary directory, this can 
> lead to the entire filesystem being removed

-1

That is expected behavior and the use case looks pretty unusual. Such a new 
parameter wouldn't even be supported by other "batteries" since there's no 
portable/standard way to either mount or unmount a directory (in fact you had 
to use a subprocess in your unit-tests).

A `delete=bool` parameter would be a more reasonable proposal in principle but:
1) if you want to keep the directory around then you can just use 
tempfile.mkdtemp() (see "there should preferably be only one way to do it")
2) it would conflict with the context manager usage which is expected to delete 
the dir on ctx manager exit

In summary, I think this would over-complicate the API for no good reason. 
I'm closing this out as rejected.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36422>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to