Add far as I know, you need to build your own python version and then recreate your environment to use the new executable. Be careful, some guides will overwrite the base python3 version to 3.9 (or whatever you are building)
Nice tutorial. You may want to update to use make altinstall instead of make install as recommended by the Python installation guide. My understanding is that altinstall does not change the default python3 version which could be important if other services depend on this.
Basically yeah, you download and install the new python version, backup your homeassistant configuration, delete your old venv, create a new venv based on the new python version, install homeassistant in the new venv and restore your backed up configuration. Takes about 10 minutes
We are currently working on ensuring Python 3.9 is fully supported and tested.
Upgrade to Python 3.8.6, sure, but Python 3.9 may result in stuff not working. Based on the 3.8 transition, I’d upgrade that may to a will, but nobody has confirmed this yet
This is how I upgrade my Python and create a new venv. I don’t blow away the old one, so that if things go wrong a rollback is easy. I’ve also written a script to do all the hard work. You pass in the version of Python and it’ll build and (alt)install that Python version, with all the right settings. Then it creates a new venv, installs the pre-requisites that HA doesn’t handle, and runs a check to speed up first startup slightly.
I would agree to hold off for at least the next version of HA before upgrading. The deprecation cycle is brutally fast in HA, we shouldn’t deprecate something before it’s replacement can at least be recommended.
Python has also announced starting 12 month releases, so upgrading one version at a time means repeating this cycle every year. I wouldn’t recommend upgrading to 3.8.x unless for some reason you had to do it now rather than in 2 or 3 weeks.
To be honest, upgrading Python (if you’re not on a Pi) is pretty painless, and it usually takes a lot longer than a few weeks for the new Python version to be validated. I’ve been running 3.7.3 until the deprecation notice was released, having upgraded to that only when 3.6 was deprecated.
At best, I’d follow the Docker containers, upgrading only when they update. Updating once a year is easy enough, and if it’s not then it’s probably time to switch to Docker