Open ygrange opened 1 month ago
(I am not sure if I fixed it because now I end up with async objects; not sure what to expect though)
The session is created in the constructor, so awaiting is only possible using a an executor job within the event loop.
Here we only create an object. Nothing can be awaited as ClientSession
is an object that is constructed as well.
When using the library, make sure the event loop is running.
In Python 3.12 asyncio seems to have broken the behaviour of getting a session while the event loop is not running.
I am not really used to async stuff so I am not sure what the best way to sove it, but for now my workaround is to
and then replace
by
(I could do an MR but this is a quick fix and you may have a nicer way to fix this :))