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 arigo
Recipients
Date 2006-04-13.09:58:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4771

This is caused by the tp_clear not doing its job -- 
in this case, tp_clear is subtype_clear(), which does
not reset the __dict__ slot to NULL because it assumes
that the __dict__ slot's content itself will be cleared,
which is perfectly true but doesn't help if self.__dict__
is self.

Attached a patch to fix this.  It's kind of hard to
test for this bug because all instances of AttrDict
are really cleared, weakrefs to them are removed,
etc.

Also attached is an example showing a similar bug: a
cycle through the ob_type field, with a object U
whose class is itself. It is harder to clear this
link because we cannot just set ob_type to NULL in
subtype_clear.  Ideas welcome...
History
Date User Action Args
2007-08-23 14:39:23adminlinkissue1469629 messages
2007-08-23 14:39:23admincreate