-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python support in future versions #103
Comments
Popping in some notes from Slack... Just to throw another spanner into the python release discussions. RH 8 only supports python 3.8 until May 2023. Up to 2024 for python 3.9 and 2029 for python 3.6 - https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle#rhel8_application_streams. RH 9 I believe have python 3.9. So our upgrade from python 3.6->3.8 on RH, meant we moved to python 3.8 which python support until Oct 2024, but RH only support up to 2023, and actually support python 3.6 for longer. I'm not sure what this means for Rocky 8, are they following the python or RH supported python versions? Maybe, adds another argument for not doing the package generations? And perhaps a reason to keep python 3.6, and add 3.9 to the mix... Just wondering if next release we could add support for python 3.9 but do that without a package build. Even starting with say running unit/integration tests on python 3.9, then publishing python 3.9 wheel and manual instructions. (By manual I mean producing equivalent of our manual instructions on site, but with the st2 package install replaced with a install of wheel etc - but hopefully we can script up much of that). If we have that process working, we can then work on putting that into installers... Or alternatively if we published say the 3.6 or 3.8 wheel that gets generated as part of the current packaging, could we define instructions/scripts on how to install with the current wheel. And the wheel and 3.9 could be done in parallel, don't block each other. Or I suspect someone has a better plan. e.g do we benefit from wheel rather than source distribution? But at least wanted to give a heads up on the early retirement of python 3.8 on RHEL, and that 3.9 is probably needed for any RH users from mid next year. |
I think Ubuntu 22.04 is shipped with python 3.10, so that is another one to add to the mix! |
Here's a matrix of currently supported versions of Python on various distributions above and beyond the currently set we support.
From an ideological stand point, I'd like to see StackStorm tested against all current versions of Python 3.7-3.10. This would open the door to a lot of other Linux distributions. |
If we are going to add Python 3.9, my gut feeling is the effort required to add 3.7 and 3.10 would be minimal (at least worth investigating the difficulty). |
@nzlosh Can we add python 3.9 and Centos 9 to your matrix? My gut also is that 3.9 and 3.10 need adding. I'm just wondering if 3.7 is worth it. More on the basis of 3rd party libraries we pull in, as we'll be restricted to 3.7+ libraries... However, I'm not sure that really is an issue for us - as most of the newer 3rd party versions seem to be for python 3.7+. However, that also brings into question as to when to drop 3.6. Dropping 3.6 allows us to move up versions, but 3.7 doesn't seem to restrict us. But looking at matrix and our 2 O/S previous idea of support, dropping 3.6 should mean adding either 3.7 + 3.9, or 3.9 and 3.10, or all 3. If we have the self check running on the github actions, and we manage to do the install without packages, then it makes it probably easier to verify multiple python versions... |
Added CentOS 9 to matrix. You're right, Python 3.7 may not be worth adding since it's going to be EOL in a years time.
Table sourced from https://endoflife.date/python Regarding python 3.6 support, I seem to recall we already hit problems where upstream module dependencies have dropped Python 3.6 because it's EOL and we have to pin to older versions. This means St2 will miss bug and security fixes the longer the pinning is held. Our ultimate dependency hell destination will be when the pinned module causes a conflict in a cross dependency that blocks development completely. I think we need to re-evaluate if it still makes sense for an open source project to limit itself to 2 distributions. I feel like this decision is a relic of StackStorm corporate days where support contracts were easier to respect on a constrained set of distributions. |
I was more thinking we want to support at least 2, rather than limiting to just 2! So if we dropped 3.6 now, we'd be limiting us to just only support one EL and one Ubuntu stream (if we don't support anything other than python 3.8) |
If we drop 3.6 and add 3.9 now we'll get functionality on 5 Linux distributions. But we won't have OS packaging available for all those distributions. That could be added with time. The other question to be answered would be if these OS' have the correct versions packaged for our external services (mongo rabbitmq and redis). Or do we consider them to be outside the scope of StackStorm and it's the users responsibility to provide the services on or off the StackStorm host? |
|
Related - perhaps we should also update the st2client binary distribution - its python2.7 - https://pypi.org/project/st2client/#files |
If Python 3.7 turns out to be straight forward to integration with 3.9 and 3.10 support, it would mean we can continue to support U1804 without keeping py3.6 support. Poetry could be a good tool to help manage StackStorm dependencies. They way you can express module dependency versions in relation to python version would invaluable when attempting to manage dependencies across multiple versions of Python. |
For building wheels: I have a working / mostly-complete setup that can churn out wheels in my pants experiment. And I'd like some feedback. Test procedure:
Now that pants is managing dependencies, some of the Makefile's dependency-related lint targets aren't needed anymore. That leaves only two lint tasks that I have not converted from Makefile over to pants:
|
Re poetry: I've played with poetry, but it doesn't work very well with monorepos (multiple python packages in the repo). So, I didn't have much luck getting poetry into the StackStorm repo. |
I would like to see us publish the wheels to pypi (for a variety of reasons, including easier pack dev environment setup). We can then use those wheels when we build the deb/rpm files to maintain all the current infrastructure as is, at least in the short/mid term. |
Here is a CI run where pants is handling all of the lint tasks: https://github.com/st2sandbox/st2/actions/runs/2543590121 https://github.com/st2sandbox/st2/actions/workflows/lint.yaml |
udatetime doesn't build on python 3.9. See StackStorm/st2#5346 where it was discussed moving to an alternative https://github.com/closeio/ciso8601 |
Part of supporting newer versions of Python is the projects dependencies. I took a look at MongoDB which has its own release life cycle. We test against MongoDB v4.x but v5 and v6 have been released. The last v4 minor release v4.4 is end of life next year and there needs to be code base updates to support the new major versions. Looking at the pymongoengine matrix it looks like a move from pymongo==3.11.3 to pymongo==4.3 will give support from MongoDB 3.6 to 6.0 running on Python 3.7 to 3.11 A quick check of the documentation vs the code base shows the following matches: |
Working on U22.04 support, I've discovered that mongodb does not provide official packages for mongodb-server other than v6.0. If we want to officially support u22.04 in favour of u18.04, supporting mongodb v6 will be a hard requirement. |
Starting an issue to discuss where to go next with Python versions and StackStorm, and how to distribute.
Current StackStorm distributes O/S specific packages with a specific StackStorm version. Currently:
Python 3.9 and Python 3.10 are available. Python 3.6 has gone EOL (however RHEL are supporting it until 2029).
EL 9 is available with python 3.9 and U22 is available with python ???
What python versions do we want to support?
Do we still want to provide O/S specific packages tied to a particular python, or want to move to a distribution mechanism that doesn't restrict to a prescribed set of python/OS combinations.
Would welcome opinions on:
The text was updated successfully, but these errors were encountered: