New submission from Nick Coghlan <ncogh...@gmail.com>:

During interpreter shutdown, modules can become unusable as module globals are 
set to None. This is a problem for tempfile.TemporaryDirectory, as it needs 
working os, os.path and stat modules in order to clean up the filesystem.

The class makes a valiant attempt at reducing the frequency of these errors, 
but it is ultimately useless, since the three modules internally rely on their 
various globals remaining valid.

Issue #812369 may be a possible solution to this problem, or perhaps even an 
explicit list of essential modules that are nulled out only after all other 
modules have been destroyed.

----------
messages: 119505
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: tempfile.TemporaryDirectory may throw errors at shutdown

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

Reply via email to