Closed
Description
Actual behavior
>>> import asyncio
>>> import aiohttp
>>>
>>> async def main():
... async with aiohttp.ClientSession() as session:
... async with session.get('https://example.com/'):
... pass
...
>>> asyncio.run(main())
>>> exit()
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000017BF133F760>
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 750, in call_soon
self._check_closed()
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
This issue was reported in aio-libs/aiohttp#4324 so the reproducer is copied from there.
Expected behavior
Normal exit without termination. There is no user-created loop to be closed manually.
Your environment
- CPython versions tested on: 3.10.4
- Operating system and architecture: Windows 10
Metadata
Metadata
Assignees
Projects
Status
Done