Outdated dependencies for Python3.11

Hi
I’ve installed python3.11 in my Raspbian and it fails to build wheels for aiohttp because the HA version 2023.2.4 depends on version 3.8.1, but the minimum version that builds against python3.11 is 3.8.3

Is there any reason to keep using the old version or just because nobody noticed? :slight_smile:

Thanks in advance!

HA just removed the support of 3.9 to switch to 3.10.
You’re too far ahead.

1 Like

The docs are slightly misleading when thay say 3.10 or later as there’s no tested 3.11 support yet, and it’s probably (based on history) a few months off.

I was looking for a post somewhere where I think I’ve read that the deps were ready for 3.11, from last year, but I can’t find it, maybe it was referring to 3.10, sorry!

I’ve tried to install all the deps manually and install the newer version of aiohttp, but I think it does not work because although the h-a processes are running, the web server is not listening, so probably I will just go back to 3.10.

Thanks!

Issue is that when HA is starting, it will detect that aiohttp 3.8.1 is not there and will (try to) downgrade it which will most probably fail.

So, yes, you go back to 3.10 (or you edit the requirements and put 3.8.3 instead of 3.8.1 and hope that it will work but I do not recommend that solution as it can be a disaster).

Yes, that is what happened, it tried to install the lib during startup, so I’m installing again with 3.10.
Thanks!

Had the same issue. I am now using virtualenv to fix the python version on macOS. Homebrew is already using 3.11 as default.

Waiting for 3.11 support.

Hi again,

After reading the deprecation alert in august versions, I’ve tried again python 3.11 and it still tries to install aiohttp 3.8.1 instead of 3.8.3 and it does not compile.

What is wrong? If H-A now supports Python 3.11, why it does still requires an old package?

Something is wrong with your system, or you have a custom component that’s forcing that version.

My 2023.7.3 install has aiohttp==3.8.5

And how can I check that? Check required versions I mean, or check components requirements.
My knowledge about python, pip and venvs is limited sorry

Look in your config folder for custom_components/ and the contents there.

I haven’t found any custom integration that specifies any version of aiohttp.
You said your install had version 3.8.5, how did you check that? The installed package inside venv?

pip3 freeze --local

That lists all the packages installed (if you activate the venv first).

That matches the requirements for core.

Ok, aiohttp looks fine, 3.8.5, but the problem comes when installing aiohttp_cors 0.7.0, which I’ve seen in its repo that it depends on aiohttp 3.8.1.
I’ve 0.7.0 installed in the venv, but H-A tries to reinstall it and I don’t know why. It is not on the link you provided me and there the text “cors” does not appear in any file inside custom_components.
How can I figure out why is it trying to install that package?

Thanks!

That’s expected too

I’m trying to manually build the wheels using pip…
Do you know if is there any cache folder I can wipe in the venv to avoid issues?

Shit, I think I’ve realised of the problem.
As the venv was created with Python 3.10 (maybe 3.9, not sure) and what I was doing was point python binaries to 3.11 manually, but when I run pip to upgrade H-A, it was done under 3.10, so the package in 3.11 was from april…
Updating right now to see if it finally works

1 Like

It finally works, took ages in my RPI 3 but after some restarts it managed to build all deps properly
Thanks @Tinkerer !

1 Like