Upgrading the Python version used by weewx v5 - when there is no need to upgrade weewx

127 views
Skip to first unread message

Joel Bion

unread,
Oct 13, 2023, 8:41:09 PM10/13/23
to weewx-user
Let's say I am running at some point in the future weewx 5.0.1, and I am running Python 3.11.

Eventually Python 3.12 comes out. Let's say it contains a security patch I would like to ensure I am using for all my Python programs, including weewx. IAs a result, I want to ensure nothing on my system is using Python 3.11. (Again, this is a hypothetical scenario). But I'm already running the latest weewx, so there's no need to upgrade that.

I know about pip update for individual modules, but what is the proper procedure to get a new python in the virtual environment - especially considering that scripts such as the station configuration need to do things, such as set the value of WEEWX_BIN, WEEWX_CFG, and others in multiple other scripts in weewx-data?

Thanks!
Joel

Tom Keffer

unread,
Oct 13, 2023, 9:27:08 PM10/13/23
to weewx...@googlegroups.com
Just create a new virtual environment using the new version of Python, then use that. No need to touch weewx-data.

Occasionally Python versions will not be upwardly compatible. That just happened with Python 3.12, where they deprecated the function datetime.datetime.utcfromtimestamp(). In those cases, you may have to upgrade WeeWX as well.

Hopefully that answers your question!

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/78e327a6-6154-4c92-afcd-b1c0e358c8b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages