Proper Python Upgrade Path In Jails

Joined
May 2, 2017
Messages
211
Hello all,

I'm a little confused by all the different levels of upstream/downstream variables, and I was hoping someone could help?

One of the applications I run operates directly on Python inside a jail. It is currently reporting it is running 3.7.9. Soon, it will require at least need 3.8. I am dealing with three levels of variables here, so I need to do this correctly. I have FreeNAS (soon to be upgraded to TrueNAS 12), the OS inside the jail (11.4-RELEASE-p4) and then Python 3.7.9 running in that.

The question is what is the proper path to upgrade here? I'm assuming updating the underlying levels will have an effect on the Python version available to the application...

Any help would be appreciated.

Thanks,
Steve
 
Joined
Jan 4, 2014
Messages
1,644
I'm assuming updating the underlying levels will have an effect on the Python version available to the application...
The assumption's not correct. I'm currently running Python 3.7 in a TrueNAS jail.

Code:
# freebsd-version
12.2-RC3
# pip --version
pip 20.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
The question is what is the proper path to upgrade here?
That would be up to the port maintainer to update the package dependencies for whatever software it is you are running.
 
Joined
May 2, 2017
Messages
211
That would be up to the port maintainer to update the package dependencies for whatever software it is you are running.

Thanks,

I'm running TrueNAS 12, then an 11.4-RELEASE-p4 jail which runs Home Assistant. It's Home Assistant that has a habit of saying "this is your problem to manage". The release notes which mention this can be found here.


The relevant text is...

-------------------------------------------------------
Python 3.7 Deprecated

Python 3.9 has been released on 5 October. This means that Python 3.7 support is now deprecated and will be removed after two months (which will be effective in 0.118).

This is only a concern if you are running Home Assistant Core directly on Python. You can check the Python version Home Assistant uses by going to the information screen in Configuration -> Info.

If you run Home Assistant OS, Supervised or Container, you don’t have to worry about this, as the Home Assistant project takes care of this for you. As a matter of fact, if you use one of those methods, you are already running Python 3.8.

We are currently working on ensuring Python 3.9 is fully supported and tested.
-------------------------------------------------------

The concern is that I'm running right inside a jail, which the text implies it will be my problem to get off Python 3.7.9 which it is currently running. I may be wrong, but this project has left us hanging before. They want you running it in Docker or on a Raspberry Pi using their OS. People like me are considered outliers now, even though the way I configured it used to be the preferred method.

So I'm trying to ensure that I have the correct version of Python ready for the next release. I'm a little confused by all the different layers and how Python works/installs/updates... It's not clear to me if Home Assistant will pull in Python 3.8 when the next version drops, or if my underlying jail needs to have 3.8 installed first.

This is why my avatar is a guy assaulting his computer. LOL
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
291
Home Assistant will support the latest two released minor Python versions

The suggested method for installing Home Assistant on *BSD is to use a virtualenv. In this case, it is simple to upgrade Python. You will need to first install python38 and py38-sqlite3, then simply remove the old virtualenv and create a new one using the updated python. Finally reinstall Home Assistant to the new virtualenv.

The OP in the installation guide, on the Home Assistant forum has been updated with instructions to help upgrade Python.
 
Last edited:
Top