Author sbt
Recipients pitrou, sbt
Date 2013-06-15.19:43:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <51BCC3C6.9070108@gmail.com>
In-reply-to <1371319899.13.0.747350154244.issue18214@psf.upfronthosting.co.za>
Content
On 15/06/2013 7:11pm, Antoine Pitrou wrote:
>> Usually garbage collection will end up clearing the module's dict anyway.
>
> This is not true, since global objects might have a __del__ and then hold
> the whole module dict alive through a reference cycle. Happily though,
> PEP 442 is going to make that concern obsolete.

I did say "usually".

> As for the interpreter shutdown itself, I have a pending patch (post-PEP 442)
> to get rid of the globals cleanup as well. It may be better to merge the two approaches.

So you would just depend on garbage collection?  Do you know how many 
refs/blocks are left at exit if one just uses garbage collection 
(assuming PEP 442 is in effect)?  I suppose adding GC support to those 
modules which currently lack it would help a lot.

BTW, I had a more complicated patch which keeps track of module dicts 
using weakrefs and purges any which were left after garbage collection 
has had a chance to free stuff.  But most module dicts ended up being 
purged anyway, so it did not seem worth the hassle when a two-line patch 
mostly fixes the immediate problem.
History
Date User Action Args
2013-06-15 19:43:07sbtsetrecipients: + sbt, pitrou
2013-06-15 19:43:07sbtlinkissue18214 messages
2013-06-15 19:43:07sbtcreate