Serhiy Storchaka added the comment: Excellent, Antoine!
Here is a patch for 3.3 with tests based on Antoine's patch. My changes to tests: * TemporaryDirectory instance is preserved as attributes of several modules. So some modules can be destroyed before cleaning up temporary directory. * Resource warning is not checked because the warning module can be destroyed at time of cleaning up temporary directory. ---------- Added file: http://bugs.python.org/file33405/tempfile_tempdir_cleanup_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19077> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com