Message357848
Typeshed declares asyncio.Future, asyncio.Task and asyncio.Queue as generic types, which is 100% correct.
The problem is that these classes don't support generic instantiation in runtime, e.g. Future[str] raises TypeError.
The feature should be implemented by adding __class_getitem__ methods which return self.
The patch is trivial but requires a few lines of C code for C Accelerated CTask and CFuture as well as updating Python code.
A volunteer is welcome! |
|
Date |
User |
Action |
Args |
2019-12-05 12:53:23 | asvetlov | set | recipients:
+ asvetlov, yselivanov |
2019-12-05 12:53:23 | asvetlov | set | messageid: <1575550403.72.0.0854877987028.issue38978@roundup.psfhosted.org> |
2019-12-05 12:53:23 | asvetlov | link | issue38978 messages |
2019-12-05 12:53:23 | asvetlov | create | |
|