Nate Soares added the comment:

I didn't know about issue29638, and I'm not sure whether my PR fixes it. 
Looking at that bug, I don't think that my PR would fix it, because I still 
trust TPFLAGS_IS_ABSTRACT when __abstractmethods__ exists. That said, I'm not 
clear on how the cache works, so it's possible that my PR would fix 29638.

My issue appears when one uses py3.6's new __init_subclass__ hook with an ABC. 
__init_subclass__ is run by type.__new__, which means that, as of py3.6, users 
can (in a natural/reasonable way) inspect ABCMeta classes before 
ABCMeta.__new__ finishes executing. I didn't see any reasonable way to have 
ABCMeta.__new__ finish setting up the ABC before calling super().__new__, so I 
figured the fix should go into inspect.isabstract. But there may be better 
solutions I just didn't think of.

----------

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

Reply via email to