Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid UserWarning when creating ClientSession outside a coroutine
If an aiohttp.ClientSession is created outside a coroutine without a running event loop, a warning is shown: /Users/walkman/Nextcloud/Projects/simple-podcast-dl/podcast_dl/cli.py:210: UserWarning: Creating a client session outside of coroutine is a very dangerous idea http = aiohttp.ClientSession() Creating a client session outside of coroutine client_session: <aiohttp.client.ClientSession object at 0x102cb5ef0> We can avoid it by explicitly passing an event loop. For details, see: aio-libs/aiohttp#1468
- Loading branch information