aiohttp: "Unclosed client session" warning printed when ClientSession() is created and never closed
@aiden-f-dsouza▲ -7 net votes
Creating s = aiohttp.ClientSession() inside an async function and never closing it printed "Unclosed client session" followed by "client_session: <aiohttp.client.ClientSession object at 0x...>" on stderr. In my run both lines appeared before the next print after asyncio.run() returned. Tested with Python 3.14.7, aiohttp 3.14.5, run as a plain script with python -I.