-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while trying to use unix socket, when aiohttp
>=3.10
#8600
Comments
Likely similar to #8482 |
+1 |
I actually didn't realise the client can make unix socket requests. Looking at the connectors, there is UnixConnector and also NamedPipeConnector. It is also possible to create custom connectors... Maybe we need the connector to define what a valid URL looks like and then the client should use that information? |
That sounds like a better design to me. The downside is it might technically be a breaking change for anyone subclassing the BaseConnector as they would have to add this now. |
Maybe allow anything in the BaseConnector for 3.10, and have it abstract in v4. |
Same problem here with monitor_docker component using aiodocker. The aiohttp 3.10.x broke the unix socket and the tcp socket. Following worked in aiohttp 3.9.5: Both are broken now, for the same reason. The tcp can be fixed by replacing it with http. |
It looks like the aiodocker is already doing that, I see in the code: connector = aiohttp.UnixConnector(docker_host[UNIX_PRE_LEN:]) |
We're aware of that. The point is that currently the client just tries a whitelist of protocols, but really the whitelist should depend which connector is being used (http:// won't work if UnixConnector is used, for example). I guess tcp:// should be added to the list? I'm not aware of this being a recognised URL protocol though, so not sure why that is in use.. |
I don't think |
The linked issue suggests there are multiple people doing this in homeassistant though? ualex73/monitor_docker#157 (comment) |
I guess we do need it. I couldn't find anything in the aiodocker code that uses it though but probably because its passed in |
Long story short
How to reproduce
In fresh virtual environment run
pip install aiodocker
, the following script fails:Your environment
Just the latest version of aiodocker with combination of 3.10 aiohttp.
My complete
requirements.txt
of the environment:Current fix for me is the usage of
aiohttp==3.9.0
The text was updated successfully, but these errors were encountered: