On Wed, 31 Jul 2013 13:30:58 +1200
Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> Antoine Pitrou wrote:
> > - it is held alive through builtins: the site module patches builtins
> >   with additional objects, which themselves keep references to the site
> >   module's globals,
> 
> The module probably *should* stay alive in that case, since
> it's still accessible via those patched builtins.

Of course. I'm not gonna kill reachable modules like a cowboy on the
loose :-)
The problem is that its global objects will get finalized very late.

Anyway, the solution is to unpatch builtins through an atexit handler
in the site module.

(my patch still has a last step where surviving modules get their
globals wiped, though)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to