[issue9072] Unloading modules - memleaks?

Slava report at bugs.python.org
Fri Jun 25 01:34:51 CEST 2010


Slava <bomboze at gmail.com> added the comment:

Thank you for taking time to answer my question about unloading modules.
I really appreciate it!

Slava

On Fri, Jun 25, 2010 at 2:43 AM, Martin v. Löwis <report at bugs.python.org>wrote:

>
> 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>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file17764/unnamed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9072>
_______________________________________
-------------- next part --------------
Thank you for taking time to answer my question about unloading modules. <div>I really appreciate it!</div><div><br></div><div>Slava<br><br><div class="gmail_quote">On Fri, Jun 25, 2010 at 2:43 AM, Martin v. Löwis <span dir="ltr">&lt;<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Martin v. Löwis &lt;<a href="mailto:martin at v.loewis.de">martin at v.loewis.de</a>&gt; added the comment:<br>
<br>
This is not a bug. You didn&#39;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.<br>
<br>
Please accept that Python indeed does not support unloading modules for severe, fundamental, insurmountable, technical problems, in 2.x.<br>
<br>
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&#39;t implemented in 3.2 and earlier.<br>

<br>
Supporting unloading will be (and was) a multi-year project. Don&#39;t expect any results in the next five years.<br>
<br>
----------<br>
nosy: +loewis<br>
resolution:  -&gt; wont fix<br>
status: open -&gt; closed<br>
<div><div></div><div class="h5"><br>
_______________________________________<br>
Python tracker &lt;<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue9072" target="_blank">http://bugs.python.org/issue9072</a>&gt;<br>
_______________________________________<br>
</div></div></blockquote></div><br></div>


More information about the Python-bugs-list mailing list