-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
_CoroGuard cannot be awaited #2026
Labels
Comments
4 tasks
Why it should produce warning if not awaited/yield from? Seems starting aiohttp 2.0+ close is synchronous method, previously it was returning empty future. |
It's still asynchronous but I want to stress people and force them to use The method still returns empty future but will be replaced with pure coroutine eventually. |
Closed by #2027 |
asvetlov
added a commit
that referenced
this issue
Jul 2, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Long story short
_CoroGuard class has no implementation for
__await__
method, only__iter__
.That's why
_CoroGuard
instance cannot beawaited
, justyielded from
.Fix warning message for
ClientSession.close()
methodExpected behaviour
_CoroGuard
can be awaitedActual behaviour
_CoroGuard
cannot be awaitedSteps to reproduce
Your environment
The text was updated successfully, but these errors were encountered: