-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remove typing.AwaitableGenerator from typeshed #8699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We could make it underscored or (and?) move it into mypy_extensions. Probably it still needs to live in typeshed somewhere because at least as it stands now we don't have anywhere else to put class definitions that mypy uses internally... |
Moving it to I'd like to make it underscored (wherever it lives, but particularly if it remains in typing.pyi), since it's implementation detail. But based on Happy to submit a PR for the following:
This also doesn't really matter, so if it's not as straightforward as that, happy to back-burner this. |
@hauntsaninja +1 from me and I would also prefer not having mypy-specific types in |
I suspect twisted.internet.defer.Deferred should be an AwaitableGenerator, how can I use this type? |
Closing in favour of #8240 (cc. @JelleZijlstra) |
Is an |
As mentioned in the code, AwaitableGenerator doesn't exist in typing.py or PEP 484.
https://github.com/python/typeshed/blob/626a0f3f7353e484e8a6c5d7a2b3f37e4694e132/stdlib/3/typing.pyi#L208
It appears it's an "intentionally undocumented" implementation detail of mypy, as mentioned in #2907. Ideally, these shouldn't leak into typeshed.
The text was updated successfully, but these errors were encountered: