Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Two years is not so long for a bug. We fixed 8-year and 12-year bugs.

The issue is that this feature is internally inconsistent (isinstance() is not 
consistent with issubclass()), the C implementation of list[int] is not 
consistent with the Python implementation of List[int], and a lot of code was 
not tested with this feature, so we perhaps have a lot of bugs in the stdlib 
and in the third-party libraries. Are we going to backport changes for making 
code working with GenericAlias as a type to 3.9 and 3.10? If not, we will 
actually add new features in 3.11 and keep 3.9 and 3.10 broken. If yes, these 
changes can have larger effect than just making isinstance(list[int], type) 
returning False, and they can break more code.

Note also that isinstance(List[int], type) was True before 3.7, and we 
intentionally made it False in 3.7 (it was required significant rewriting of 
the typing module and introducing __mro_entries__). Do we want to revert this 
decision?

----------

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

Reply via email to