Home Assistant Core - Python 3.10 backport for Debian 11 bullseye

Sorry if I’ve done something “wrong”.
I do have my reasons, read more than “deb Index of /python3.10 …” under /etc/apt and running in a virtual environment should be safe until I resolve the “bookworm issiues” for my other repositories.
BTW
Thanks!

Of course you haven’t done anything wrong. Any experience of how you solved a problem is a good one and worth sharing.

It’s just not the goal I had in mind. I wanted people to have an easy way to install Python 3.10 without messing with compiling it and possibly bricking their systems by installing it wrong.

:+1: :ok_hand:

Hello,

It looks Python 3.11 will be deprecated soon, 2023.2 if I understand correctly.

Do you plan to make a similar backport for Python 3.12 in Bookworm?

I personally am still using Debian Buster and Python 3.10, so I am still on 2023.7 or something. Haven’t taken the time to upgrade fully.

It is a shame that they’re dropping Python support even faster nowadays but I can somewhat understand it.

You’re correct, I’ve taken a look at the code, and they’re deprecating Python 3.11 in 2024.2 and removing support in 2024.4. So we still have 2 months left.

I currently have no plans to support it, however as I will probably need it myself in the future, there is a high change that I will create a backport. The question is if I am on time before 2024.4…

Thanks for letting me know and when I have a backport for 3.12 ready, I’ll link it here.

FYI, in my case the upgrade from Bullseye to Bookworm had no particular issue but I don’t know your specific setup :slight_smile:

I also have been surprised, I thought two last versions of Python was supported by Home Assistant but looks it is not really the case anymore.

It looks I will have to use pyenv again :slight_smile: except if I can do anything to help you to have a backport on time, I have some experience on GitHub and less on Debian packaging even if I am now maintaining two official little packages on Debian now so if I can do anything, do not hesitate to ask, I am OK to test for example.

Thank you! I want to do a full reinstall because I want to make some changes such as full disk encryption which require a reinstall anyway. So it takes a bit of time before my new image is ready :wink:

Yeah that’s correct, they changed it in ADR-0020 to just one unfortunately. Reasoning that 96% of the users use Container based installations and therefore Python support doesn’t matter.

Thanks for your offer! Backporting Python can be quite cumbersome because of dependencies on all the wheels and pip etc. Backporting the full suite will cost a lot of time and may even be impossible because of dependency clashes (which is probably why it isn’t done in the -backports repository). So I’ve sort of hacked it together by only backporting Python itself and linking them to the Python pip and wheels already present on the system. This has worked reasonably well.

If it doesn’t work out, you can still go pyenv in two months :wink:

For @Nardol and everyone else who might be interested in running HASS Core 2024.4 on Debian: This might interest you :wink: Python 3.12 backport for Debian 12 bookworm

1 Like