You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue cannot be solved, sorry.
The reason is: after calling transport.close()asyncio needs for extra loop iteration for actual closing.
It's by design.
So if you add await asyncio.sleep(0) just before loop closing -- warning disappears.
If you want -- please feel free to add a note section to aiohttp documentation for stressing the behavior.
Perhaps it should be somewhere at very end of http://aiohttp.readthedocs.io/en/stable/client.html
Long story short
I'd like my software be warning-free.
Expected behaviour
Correct use of
asyncio
doesn't cause any warnings.Actual behaviour
ResourceWarning: unclosed transport
is emitted.Steps to reproduce
Put this in
test.py
:Then run:
Your environment
aiohttp from git master (d8848dd), Python 3.5.2, Linux.
The text was updated successfully, but these errors were encountered: