Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

Although PR12004 fixes the problem, something a bit more fundamental may have 
changed. I have spent time investigating why this is happening and the problem 
is that in the line:


self.assertEqual(c.attr, 1)

Evil.__eq__ is invoked twice where before it was only invoked once. This does 
not happen all the time, and it seems to only happen under some combination of 
hashes in the class dictionary, being the extra __eq__ invocation a check for 
equality when looking up attr in the c object. When the test succeeds, the 
extra check is not done (and therefore the attribute is not deleted). I think 
this happens because some identity is used to check when doing the lookup 
(comparing the pointers) but I would like to understand exactly how the hash is 
influencing the different code paths to be sure that nothing important has 
changed recently.

----------

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

Reply via email to