Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix isinstance() with generic protocol subclasses after subscripting #669
Conversation
|
Be sure to also merge this upstream in the cpython repo.
--
--Guido (mobile)
|
The bug is Python 2 specific, but I wanted to add tests to |


Fixes #656
The problem is if a generic class inherits from a protocol, then
GenericMeta.__subclasscheck__()gets overridden with
_ProtocolMeta.__subclasscheck__()that calls the former viasuper(), thus causing an extra frame.