Nathaniel Smith added the comment:

Here's a slightly improved patch spurred by a parenthetical comment of 
Antoine's on the mailing list :-).

The only change is that it adds a check in subclass_dealloc to correct the 
reference counting in the weird case that someone converts a HEAPTYPE object 
into a non-HEAPTYPE object while it is being deallocated.

I should probably also mention that I ran the full test suite against the 
patched version and everything passed; and with -R 3:2 the only difference is a 
new reference leak in test_zipfile. I'm guessing this might be spurious, given 
that AFAIK this test shouldn't be touching __class__ assignment at all? But IDK.

----------
Added file: 
http://bugs.python.org/file37347/better-__class__-assignment-v2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to