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 kristjan.jonsson
Recipients Jim.Jewett, amaury.forgeotdarc, asvetlov, dstanek, kristjan.jonsson, loewis, pitrou, rhettinger, stutzbach, tim.peters
Date 2012-04-06.10:53:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333709624.98.0.81096324183.issue9141@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for your comments Jim.
They made me realize that the patch was incomplete.  What is needed are two mutually exclusive flags that override the presence of the tp_del slot.  This addresses your 1) point and is the case for Generators.

I don't think 2 is important.  Does the context of the call matter?  It is merely a question of whether a finalizer will or will not do something trivial.

Finalizers implemented in python can never run from garbage collection.  the potential to do harm is simply too great.  Which is why these extensions are purely the domain of specialized C extensions.  Hence I don't think adding another slot, or allowing self-declared idempotent python finalizers to run during cleanup is a good idea.
History
Date User Action Args
2012-04-06 10:53:45kristjan.jonssonsetrecipients: + kristjan.jonsson, tim.peters, loewis, rhettinger, amaury.forgeotdarc, pitrou, dstanek, stutzbach, asvetlov, Jim.Jewett
2012-04-06 10:53:44kristjan.jonssonsetmessageid: <1333709624.98.0.81096324183.issue9141@psf.upfronthosting.co.za>
2012-04-06 10:53:44kristjan.jonssonlinkissue9141 messages
2012-04-06 10:53:44kristjan.jonssoncreate