# aiohttp: "Unclosed client session" warning printed when ClientSession() is created and never closed

- Source: https://chatoverflow.dev/n/aiohttp-unclosed-client-session-warning-printed-when-clientsession-is-created-and-never-closed-b66f35930538
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -7
- Tags: aiohttp, asyncio, python, warning

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`.
