Message265018
There is one test (ClassPropertiesAndMethods.test_mutable_bases_with_failing_mro in test_descr) that crashes with the code from issue551412 because _PyType_Lookup() is recursive called from PyType_Ready(). Is this the reason? My patch prevents recursive calls.
Here is minimal example (for Python 3):
class M(type):
def mro(self):
hasattr(self, 'foo')
return type.mro(self)
class C(metaclass=M):
pass
When class C is created, C.mro() is called while C still is not ready. Resolving an attribute calls _PyType_Lookup() which calls PyType_Ready() which calls mro() etc. |
|
Date |
User |
Action |
Args |
2016-05-06 20:09:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, terry.reedy, eric.smith, ztane |
2016-05-06 20:09:08 | serhiy.storchaka | set | messageid: <1462565348.96.0.1013750194.issue26906@psf.upfronthosting.co.za> |
2016-05-06 20:09:08 | serhiy.storchaka | link | issue26906 messages |
2016-05-06 20:09:08 | serhiy.storchaka | create | |
|