Ivan Levkivskyi <levkivs...@gmail.com> added the comment:
This question appeared several times before, and the conclusion is that we are not going to do this. There are many cases in standard library that are generic in stubs (and by nature) but are not declared as such at runtime, so we simply can't provide a typing equivalent for all of them. In Python 3.7 you can just use from __future__ import annotations for those, and/or use the recipes described here https://mypy.readthedocs.io/en/latest/common_issues.html#using-classes-that-are-generic-in-stubs-but-not-at-runtime Maybe at some point we will start using `Generic` in standard library, but for now I am closing this as wontfix. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36009> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com