[issue21919] Changing cls.__bases__ must ensure proper metaclass inheritance

Raymond Hettinger report at bugs.python.org
Fri Sep 28 14:17:36 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

>  I am adding Raymond as part of triaging who might have a better explanation about this. 

Guido, is this something we care about?  There is value in checking for metaclass conflicts when a class is created (to catch plausible mistakes and to assure that the right __new__() and __init__() methods run).  But post-creation, it's unclear whether there is value in rerunning checks and whether its even possible to know how other base classes might have affected the class creation.

Do this go in the "consenting adults" category (in the same way that we allow the __class__ attribute to be changed on instances without trying to verify whether it makes sense)?

----------
assignee:  -> gvanrossum
nosy: +gvanrossum
versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21919>
_______________________________________


More information about the Python-bugs-list mailing list