Skip to content

Remove typing.AwaitableGenerator #13804

Closed as duplicate of#7580
Closed as duplicate of#7580
@AlanBogarin

Description

@AlanBogarin

While manipulating coroutines, I came across AwaitableGenerator. Everything was going well until I noticed it had four type parameters. So, I checked the code.
Apparently, they have an additional type variable _S, which, to me, makes no sense since it's not used in the protocol.

So, I want to know if this feature is intentional and if it has any use.
If not, I think it's appropriate to follow the Generator[YieldT, SendT, ReturnT] structure because it is a generator but it supports await.


Blocked by python/mypy#8240 and pyright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: deferredIssue or PR deferred until some precondition is fixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions