On Mon, 31 Dec 2012 10:25:25 +1300 Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Richard Oudkerk wrote: > > Personally I would like to get rid of the "purge globals" behaviour for > > modules deleted before shutdown has started: if someone manipulates > > sys.modules then they can just call gc.collect() if they want to > > promptly get rid of orphaned reference cycles. > > Now that we have cyclic gc, is there any need for the > shutdown purge at all?
If you have an object with a __del__ method as a module global, the cyclic gc will refuse to consider the module globals at all (which means it will affect unrelated objects). So, yes, I think the shutdown purge is still necessary. Perhaps there are ways to make it smarter. 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