[issue9072] Unloading modules - memleaks?

Martin v. Löwis report at bugs.python.org
Fri Jun 25 00:43:55 CEST 2010


Martin v. Löwis <martin at v.loewis.de> added the comment:

This is not a bug. You didn't *nearly* reset Python to the state in which it was before the import: the modules that got imported recursively still hang in sys.modules.

Please accept that Python indeed does not support unloading modules for severe, fundamental, insurmountable, technical problems, in 2.x.

In 3.x, chances are slightly higher. In principle, unloading could be supported - but no module actually adds the necessary code, and the necessary code in the import machinery isn't implemented in 3.2 and earlier.

Supporting unloading will be (and was) a multi-year project. Don't expect any results in the next five years.

----------
nosy: +loewis
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9072>
_______________________________________


More information about the Python-bugs-list mailing list