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 martin.panter
Recipients eric.snow, martin.panter, nagisa, rhettinger, serhiy.storchaka, vstinner
Date 2015-10-29.03:06:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446087987.55.0.893074191103.issue25395@psf.upfronthosting.co.za>
In-reply-to
Content
Left a comment about a minor English grammar problem.

The existing comment Serhiy mentioned was added way back in 2003 for Issue 668433. It appears to use the same underlying technique, reverting the nesting level before calling the base class dealloc. One paragraph talks about the extra increment used there compared to Serhiy’s method:

'''
But now it's possible that a chain of objects consisting solely of objects whose deallocator is subtype_dealloc() will defeat the trashcan mechanism completely: the decremented level means that the effective level never reaches the limit.  Therefore, we *increment* the level *before* entering the trashcan block, and matchingly decrement it after leaving.  This means the trashcan code will trigger a little early, but that's no big deal.
'''

I think we may not have to worry about this for ordered dict, assuming that PyDict_Type.tp_dealloc() can only recursively invoke odict_dealloc() from within its own trashcan block.

So as far as I can tell, this patch is good to apply, unless someone with more knowledge of garbage collection has any comments.
History
Date User Action Args
2015-10-29 03:06:27martin.pantersetrecipients: + martin.panter, rhettinger, vstinner, eric.snow, serhiy.storchaka, nagisa
2015-10-29 03:06:27martin.pantersetmessageid: <1446087987.55.0.893074191103.issue25395@psf.upfronthosting.co.za>
2015-10-29 03:06:27martin.panterlinkissue25395 messages
2015-10-29 03:06:25martin.pantercreate