We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using ClientSession as an asynchronous context manager, self.close is not awaited and it throws DeprecationWarning.
ClientSession
self.close
DeprecationWarning
Returns self.close() in ClientSession.__aexit__
self.close()
ClientSession.__aexit__
Calls self.close() in ClientSession.__aexit__
import asyncio from aiohttp import ClientSession loop = asyncio.get_event_loop() async def coro(): async with ClientSession(loop=loop): pass loop.run_until_complete(coro())
OS X 10.12.3 python 3.6.0 aiohttp==2.2.3
The text was updated successfully, but these errors were encountered:
Fixed by #2064
Sorry, something went wrong.
Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that new issue.
No branches or pull requests
Long story short
When using
ClientSession
as an asynchronous context manager,self.close
is not awaited and it throwsDeprecationWarning
.Expected behaviour
Returns
self.close()
inClientSession.__aexit__
Actual behaviour
Calls
self.close()
inClientSession.__aexit__
Steps to reproduce
Your environment
The text was updated successfully, but these errors were encountered: