[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types
Ivan Levkivskyi
report at bugs.python.org
Tue Sep 4 19:15:12 EDT 2018
Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:
It was a deliberate decision. You can find some motivation in PEP 560, and yes we used provisional status here. It was a hard decision, but we decided that giving up few percent of backwards compatibility is a reasonable price for up to 5x performance boost.
It looks like some of your problems may be solved by https://github.com/ilevkivskyi/typing_inspect (use `pip install typing_inspect`) that aims at providing cross-version runtime introspection of typing objects by carefully wrapping some "hidden" internal API.
There is a plan to include most used part of typing_inspect in typing itself, see for example https://github.com/python/typing/issues/570.
(it is hard to give an estimate about when, I really want to do this soon, but just don't have time).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34568>
_______________________________________
More information about the Python-bugs-list
mailing list