Since aiohttp==3.10.0, instantiating aiohttp.ClientSession must be done from an async function. Calling this from a non-async function relied on deprecated behaviour in Python, which broke in recent releases. https://github.com/aio-libs/aiohttp/issues/8555#issuecomment-2263814747 explains the situation.
Since
aiohttp==3.10.0
, instantiatingaiohttp.ClientSession
must be done from an async function. Calling this from a non-async function relied on deprecated behaviour in Python, which broke in recent releases. https://github.com/aio-libs/aiohttp/issues/8555#issuecomment-2263814747 explains the situation.We would do this when using GCM + an HTTP proxy:
https://github.com/matrix-org/sygnal/blob/345aa61a59cebc2b87a7375ab696838f98e37097/sygnal/gcmpushkin.py#L213-L217
Rather than pin
aiohttp
to an older version, let's just fix the behaviour. Supersedes https://github.com/matrix-org/sygnal/pull/394.