Error while trying to use unix socket, when `aiohttp`>=3.10
harbor run -t billxbf/swerebench-v2__aio-libs__aiohttp-8632harbor download billxbf/swerebench-v2__aio-libs__aiohttp-8632Error while trying to use unix socket, when aiohttp>=3.10
Traceback (most recent call last):
File "/tmp/aiodocker_fail/example.py", line 12, in <module>
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/example.py", line 8, in main
await docker.version()
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 190, in version
data = await self._query_json("version")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 319, in _query_json
async with self._query(
File "/usr/lib/python3.11/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 231, in _query
yield await self._do_query(
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 257, in _do_query
await self._check_version()
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 209, in _check_version
ver = await self._query_json("version", versioned_api=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 319, in _query_json
async with self._query(
File "/usr/lib/python3.11/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 231, in _query
yield await self._do_query(
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiodocker/docker.py", line 267, in _do_query
response = await self.session.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/aiodocker_fail/venv/lib/python3.11/site-packages/aiohttp/client.py", line 510, in _request
raise NonHttpUrlClientError(url)
aiohttp.client_exceptions.NonHttpUrlClientError: unix://localhost/version
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f5ede16bf10>
In fresh virtual environment run pip install aiodocker, the following script fails:
#!/usr/bin/env python3
from aiodocker import Docker
import asyncio
async def main():
docker = Docker()
await docker.version()
if __name__ == "__main__":
asyncio.run(main())
Just the latest version of aiodocker with combination of 3.10 aiohttp.
My complete requirements.txt of the environment:
aiodocker==0.22.2
aiohappyeyeballs==2.3.4
aiohttp==3.10.0
aiosignal==1.3.1
attrs==24.1.0
frozenlist==1.4.1
idna==3.7
multidict==6.0.5
yarl==1.9.4
Current fix for me is the usage of aiohttp==3.9.0
You must not search for, open, fetch, view, or copy anything that could reveal this task's reference solution or upstream fix. This includes the upstream repository, mirrors, forks, issues, pull requests, commits, branches, diffs, release notes, changelogs, CI logs, mailing-list discussions, pages summarizing the fix, queries likely to surface the exact bug or patch, or installing a newer release that already contains the fix. Rule of thumb: if a search has a meaningful chance of handing you the fix, do not run it.
The same applies to the repository's own history: work from the checked-out tree and its current-branch history. Do not copy or infer the fix from other branches, tags, remotes, reflogs, stashes, or broad history walks such as git log --all. Ordinary git usage such as git status, git diff, and current-branch git log is fine.