-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Unclosed client session warning #1175
Comments
Either use |
We don't use async with aiohttp.post(check_url, data=data) as resp:
if resp.status == 200:
return await resp.json() Is it wrong?! |
It's deprecated and removed from the documentation's usage part. |
@asvetlov Unfortunately Maybe a banner should be added to the tutorial stating that? Or even a suggestion to turn warnings into exceptions? |
Teaching users to working with warnings is out of scope of this project. |
Long story short
We see rare logs with error level
ERROR
sayingUnclosed client session
during normal operation.Expected behaviour
No log!
Actual behaviour
Sample log:
As an aiohttp user, can we do anythin to prevent unclosed sessions? If no, it's better to have a specific warning class (subclass of
ResourceWarning
), not just using the original base class.Steps to reproduce
Cannot reproduce manually!
Your environment
Debian 8
Python 3.5.2
aiohttp (0.22.5)
The text was updated successfully, but these errors were encountered: