[Python-Dev] Block module import during Python finalization?

Eric Snow ericsnowcurrently at gmail.com
Tue Oct 29 00:38:17 CET 2013

On Mon, Oct 28, 2013 at 12:45 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> I propose to block importing new modules (or import again unloaded
> modules) during Python finalization to avoid such tricky bugs.

Alternatively, we could set sys.modules[name] to None for each
builtin/frozen module when they get finalized.  This will prevent
importing those modules afterward.


More information about the Python-Dev mailing list