Seems that Generic.__class_getitem__ can't be called automatically after cythonization.
Code sample example.py:
from typing import Generic, TypeVar
T = TypeVar("T")
print(Generic[T])
Cythonization:
cythonize -a -i example.py
The cythonized code fails with TypeError:
>>> import example
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "example.py", line 5, in init example
print(Generic[T])
TypeError: 'type' object is not subscriptable
Cython 0.29.1
Python 3.7.1
Seems that
Generic.__class_getitem__can't be called automatically after cythonization.Code sample
example.py:Cythonization:
cythonize -a -i example.pyThe cythonized code fails with
TypeError:Cython 0.29.1
Python 3.7.1