New submission from Jacob Hayes <jacob.r.ha...@gmail.com>:
Reproduction: ``` from graphlib import TopologicalSorter TopologicalSorter[str]({"a": {}, "b": {"a"}}) ``` ``` $ mypy /tmp/toposort.py Success: no issues found in 1 source file $ python3 /tmp/toposort.py Traceback (most recent call last): File "/tmp/toposort.py", line 3, in <module> TopologicalSorter[str]({"a": {}, "b": {"a"}}) TypeError: 'type' object is not subscriptable ``` I opened the issue here (rather than typeshed) because we'd presumably like to support this at runtime too. Typeshed link: https://github.com/python/mypy/blob/0a830481980bfc554ded61a3eaaaecde384a21e4/mypy/typeshed/stdlib/graphlib.pyi#L6 ---------- components: Library (Lib) messages: 403115 nosy: JacobHayes priority: normal severity: normal status: open title: TopologicalSorter is not Generic at runtime (but is in typeshed) type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45359> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com