This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients Robin.Schreiber, asvetlov, gregory.p.smith, gstein, loewis, pitrou
Date 2012-08-18.23:00:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <1345319985.4150.5.camel@localhost.localdomain>
> By leaf, you mean the derived subtype? That sounds a bit quirky (you
> need the aforementioned "if"), how about the base heap type instead?

I think this fails (currently) because a subtype defined in Python using
a "class" statement will automatically get subtype_dealloc as its dealloc
function, which will in turn unconditionally decrefs the type (after
calling the tp_dealloc function from its nearest ancestor which doesn't
use subtype_dealloc).

> Speaking of which, what does this refactoring bring exactly? The type
> declarations are slightly less verbose, but other than that, is there a
> point?

It's really about the PEP 3121 changes: modules shouldn't have any
global variables shared across interpreters, so that module cleanup
can work properly. Ultimately, this can lead to gc-based shutdown,
module unloading, and better separation of interpreters.

In addition, it further reduces the differences between "extension
types" and "classes" (which supposedly were removed by dropping
old-style classes, yet some inconsistencies remain where the
interpreter offers some features only to heaptypes).
Date User Action Args
2012-08-18 23:00:23loewissetrecipients: + loewis, gstein, gregory.p.smith, pitrou, asvetlov, Robin.Schreiber
2012-08-18 23:00:23loewislinkissue15653 messages
2012-08-18 23:00:22loewiscreate