New submission from Ian <iarp.compt...@gmail.com>:
The documentation found here https://docs.python.org/3.7/library/tempfile.html#tempfile.TemporaryDirectory states the following "On completion of the context or destruction of the temporary directory object the newly created temporary directory and all its contents are removed from the filesystem." However calling del on the object does not call the cleanup method. t = tempfile.TemporaryDirectory() del t I'm not sure if that is incorrect documentation or my own misunderstanding of what you call destruction. I tested adding my own def __del__(): self.cleanup() which worked as I expected. ---------- messages: 353393 nosy: iarp priority: normal severity: normal status: open title: Documentation says destuction of TemporaryDirectory object will also delete it, but it does not. type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38300> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com