[issue26906] format(object.__reduce__) fails intermittently

Serhiy Storchaka report at bugs.python.org
Wed May 4 11:46:38 EDT 2016


Serhiy Storchaka added the comment:

An alternative way is just call PyType_Ready from _PyType_Lookup if type->tp_mro is NULL.

Here is a patch against 2.7 that restores the solution from issue551412, but returns NULL if type->tp_mro is still NULL after calling PyType_Ready. I found one place in tests when this is happened (CIOTest.test_IOBase_finalize in test_io).

----------
assignee:  -> gvanrossum
nosy: +gvanrossum
Added file: http://bugs.python.org/file42717/init_type_in_pytype_lookup.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26906>
_______________________________________


More information about the Python-bugs-list mailing list