-
-
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 2 Deprecation #40
Comments
I think heavy communication is the way to go. Start having warnings in the install that call this out. |
I think it would be wise to split up the Python 2 discussion into two separate but related parts: the ST2 codebase itself, and packs on Exchange. ST2 codebase itselfI don't know that we need to have deprecation warnings for Python 2 in our codebase. Everybody who codes in Python 2.7 has been warned about this for a few years now every time they fire up We also don't have any official corporate sponsors anymore, so I don't feel like we owe it to anybody to continue to support Python 2.7 in future ST2 relases. Python 2.7 is deader than a "just resting" parrot! 😆 Exchange PacksExchange packs are a different story. Currently, most packs support both Python 2.7 and Python 3, including tests under both environments. That means that people who are still using ST2 on Python 2.7 might be installing packs using Python 2.7. Ideally, we should support that until those versions of ST2 are EOL. While we do have a way for packs to advertise support for which Python version they support, I think it's fair to continue to support both Python versions in Exchange packs as long as there are ST2 versions that support Python 2.7. This means that removing Python 2 code and tests from Exchange packs will be dependent on how quickly we can move to Python 3-only ST2 releases. Once the last version of ST2 that supports Python 2.7 is EOL, then we can start removing Python 2.7 support from Exchange packs and their CI/deploy configs. The timeline for Exchange packs is therefore much longer than for the ST2 codebase. All the more reason to drop Python 2.7 sooner in ST2 itself, IMO. |
Interesting opinion about the python 2 in Exchange Packs. I agree that as fast we remove py2 support would be better for the project. I however disagree we can do it in one release or without a warning because everybody knows py2 is old. This is not the reality. Hence as earlier we can do this: StackStorm/st2#4938 and start communicating py2 deprecation faster we can really drop it. Hence I believe actionable item here is to add this warning StackStorm/st2#4938. BTW this was initially discussed in May. |
I also have concerns that we are seeing errors being raised where packs work on python 2.7, and not python 3. There was an IMAP one in the last few weeks, before that I noticed ghost2logger only worked on python 2(though that was fixed with ST2 monkey_patch). In last week another raised on mysql. How many packs are heavily being used in python 3? Can we find out from community, or do code analysis (that iter_items problems seems a common one). |
We will have to ensure the OS we target support a package with a python3 named binary. Centos 7, 8. Ubuntu 18, 20. I think. That way we can change all the cmd scripts to use that one. Then we add this package as a dependency. Users need to be warned IMO. |
During the testing of Add python warning if install a pack that only supports python 2 a PR by @amanda11 a few things I noticed:
@amanda11 @winem @Sheshagiri @blag WDYT? |
I was wondering whether for packs there was going to need to be a use-python2 flag, to replace the use-puthon3 when we went further with the py2 removal. But then my contrary argument to it was then does that mean people won't move and we still have to CI packs on py2. Though it would make things easier for users. We could also put in a warning if python versions is not defined. With the st2ctl start what warning are we giving the users? It isn't their fault that stackstorm on that platform is using py2. So would the message be annoying and unhelpful. Putting in logs would be ok and along the lines of warning them we will move it to py3. But I am not sure what the aim of a warning to them on startup is - it's not like the packs where they can do something about it. We may then get the questions about how to run st2 on Centos 7 with python 3, but as we don't CI it then it wouldn't be a supported variant. Therefore what was the aim of the warning? |
More thoughts. On st2ctl I guess if the warning was along the lines of |
Right, the first message to deliver is about any possible py2 packs. Second is the platform itself running under the python 2 environment which will likely be affected by the breaking py2 -> py3 change in the future releases. |
Thanks, @armab That makes sense, and clarifies it. So a few things to get across on the py 2 startup then. |
Not sure how the technical implementation would go, but yes, the future intent is to try to build the st2 packages with the python 3 dependency for both EL7 and U16 platforms. |
So
As a @StackStorm/maintainers @StackStorm/contributors team we'll also need to gather and discuss the plans and technical side about Python 2 deprecation. |
After "volunteering" to lead this effort, I wanted to update with my understanding of the current status:
I have a blog post of "where we are", but will wait to publish until I can update to include what our future plans are. As mentioned above we need to decide what the next steps are and the order. See @blag point above for differences between ST2 and Pack support. How best to now proceed? Do we want to schedule a meeting to discuss in more detail? Who is interested in attending? Similar time of day to TSC? Would be good to get some input on agenda for meeting, some suggestions below:
|
Added my thoughts below:
|
Thanks @nmaludy. Some queries:
|
I drew up a comparison between officially supported Python versions and their availability on officially supported OS'. (plus Debian because I'd like to see it included in the list of tested OS'). The colouring is based on how many days before the product hits EOL. As @blag had already stated elsewhere, Python3.8 is the optimal version to support going forward. If we have Python3.8 support, it will give at least 2 years of official support of Python across Ubuntu, CentOS and Debian. CentOS 6 and Ubuntu 16.04 support should be dropped now as there's no way forward with these OS'. |
Thanks @nzlosh that's a great table. One already gone :-) CentOS 6 has already been dropped in the StackStorm 3.3 release. I'm seeing consensus so far on dropping Ubuntu 16.04 and adding Ubuntu 20.04/Python 3.8 support instead. Will be interested to see if anyone, has a contrary view? |
That's a good breakdown! Looks like you people covered here all the technical corner cases and dependencies in one topic, eg. what's blocked on what. Great work! 👍 Looking from the community support side, I don't think it's possible to drop the Ubuntu 16.04 support right now, until it reaches its EOL. Turns out however it's the only thing that would block py2 deprecation. I'm not sure if we want to wait with py2 until April 2021 though, py 3.6 from PPA might be an option? I guess timing really depends on team progress around py2 deprecation. Ubuntu 20.04 and Python 3.8 is great. We can include it anytime as one of the supported platforms as soon as: 1.) Py 3.8 is added to the st2 build matrix, passed, stable, works 2.) New U20 packages are produced and well tested. This work could be done anytime and included in any st2 release as soon as it's ready. @nzlosh want to volunteer starting that work? With the new 3 months st2 release cadence things become easier. |
@StackStorm/maintainers @StackStorm/contributors Let's indeed organize a Python 2 Deprecation Meeting. Same time as TSC meetings. Next week (13 Oct) or Week after (20 Oct) Tuesday? WDYT? |
Considering no one is paying us to support Ubuntu 16, can we announce we will deprecate it soon rather than have to port python3 there? I know it’s not EOL, but we are a python project mostly and that’s a hard requirement.
JP Bourget / @punkrokk
… On Oct 9, 2020, at 10:18 AM, Eugen C. ***@***.***> wrote:
That's a good breakdown! Looks like you people covered here all the technical corner cases and dependencies in one topic, eg. what's blocked on what. Great work! 👍
Looking from the community support side, I don't think it's possible to drop the Ubuntu 16.04 support right now, until it reaches its EOL. Turns out however it's the only thing that would block py2 deprecation. I'm not sure if we want to wait until April 2021 though, 3.6 from PPA might be an option? I guess timing really depends on team progress around py2 deprecation really.
Ubuntu 20.04 and Python 3.8 is great. We can include it anytime as one of the supported platforms as soon as: 1.) Py 3.8 is added to the st2 build matrix, passed, stable, works 2.) New U20 packages are produced and well tested. This work could be done anytime and included in any st2 release. @nzlosh want to volunteer doing that work?
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it does not break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
This is an example PR for what I'd like to do to all exchange packs after StackStorm-Exchange/ci#101 is merged: Feedback welcome before I push PRs to all the rest of the packs. I have a branch with these updates prepared for all packs. Interestingly, once we drop python2.7 tests, the circleci config across packs becomes very consistent for all packs except for the weekly job schedule (Sunday vs Saturday) and some extra circleci jobs in zabbix pack. |
That went a bit excessive.. including Email, Slack, Github notifications. @cognifloyd To avoid future Github spam in StackStorm-Exchange, instead of opening a bunch of PRs, can you please work with @blag or @nmaludy so they’ll push the changes based on automation script you have directly to This is pretty much an administrative task (we have st2 bot account for the purpose) and I appreciate your involvement to help the Exchange maintainers. |
Yes. Sorry for the spam. |
@cognifloyd NP and thanks for helping there. Let's try to rely on mechanisms we have to minimize the noise while doing the same impact. I'm thinking that the StackStrom-Exchange story might need a bit more prep. |
@StackStorm/tsc If we drop the Python 2 tests in Exchange, I think it's a bit more involved. So removing tests is only start of the story. We were serious about the approach taken with Python 2 Deprecation for StackStorm, including communication, thinking about user impact, dedicating a release, deprecation warnings and even some API/CLI changes postponed up to 3.5. Let's be serious about the StackStorm Exchange as well. We could do something close to:
This way we'll be super clear about what's going on and better balanced with respect to user expectations. |
I strongly disagree with this assertion. There's plenty of code in StackStorm, and in StackStorm packs that has no test coverage, but I think we all consider such code still supported. Ensuring that all supported code is tested is absolutely the ideal, but it is not a rule, and I don't even think it's an expectation. @armab I like that checklist, but I don't think step 1 has to happen at the same time as step 2. And, if we drop Most churn in Exchange packs is due to dependencies suddenly causing failures because the dependencies have removed support for Python 2. So in the past we've pinned a lot of the dependencies that are failing. If we remove the Python 2 tests now, and then remove official support for them in May with ST2 v3.5, that's only going to be about 3 months where supported (by us) Python 2 code is exposed but not tested. And users who are still running on Python 2.7 are already aware that they are playing with fire by running on a runtime that has reached EOL, so I don't think the impact is going to be severe. And for whatever impact we do have, honestly, I'm out of empathy for those users at this point. Python 3 has been out for 13 years now. The writing has been on the wall for 13 years. Three more months of us still supporting that code (eg: by not merging in Python 3-only code) but not testing that code is not going to change the risk calculations for anybody still running on Python 2.7. Edited to add: Whatever we decide to do, we should consider the cost/benefit of it. We should not go through heroics to keep the Python 2.7 tests running, since they're only going to be useful for the next three months. And keeping support but not tests for Python 2.7 through ST2 v3.5 benefits our users without significantly costing us anything. I'm don't consider support without tests to be an ideal solution, and I do not advocate that approach in general, but I think in this specific situation it's an acceptable, temporary compromise between keeping our users happy and amount of effort required on our parts. |
To be very clear: I already spent several days on it, trying to get it working, and discovering several of the broken pieces. I don't think fixing the python 2.7 tests is worth the effort. |
We will no longer test packs with python2.7, as it is broken and the fix (re-adding 2.7) is too invasive across all of our infrastructure. We continue supporting 2.7 but only on an as-reported basis. If someone submits a PR for 2.7 and it doesn't break with python 3, great. If a pack is upgraded so that it can only be used with python 3, then people can downgrade to an earlier version that supported python 2. StackStorm/community#40 (comment)
There were some sparks and scattered talks around this topic that slip through the cracks. Let's start an async discussion about Python 2 Deprecation to think more how can we do this.
The Problem
Python 2 is old and reached its EOL. It served us a long time, but today per @blag valid point, Python 2 pulls the project down because of CI issues, our
pip
dependencies are dropping support for py2 and so it makes maintenance hard. Not to forget about the modern Python 3 features we can't use to keep the codebase py2-compatible.Removing Python 2 support and relying on Python 3 only is the required thing to do. The only questions are When? and How?.
The Plan
1) Communication
We can't just go and remove python 2 in nearest release, breaking users installations. Don't be that software!
This should be communicated beforehand. Make the blog Announcement, describe the transition plan, expectations and migration path so everyone is on the same page. That's why it's important for @StackStorm/tsc to come up with a conclusion about the desired plan, versions affected, roadmap, what needs to be done, when, who's in game and so on.
2) Deprecation Warnings
See StackStorm/st2#4938 for more info. We'll need a Deprecation Warning in st2 to indicate that Python 2 will be fully removed in st2
v3.X
(to be decided) version. As you can imagine, there are many users with old python2 legacy packs they wrote before.So there are 2 aspects we want to cover:
As faster we can decide on this and implement, - earlier we could remove py2 later.
3) Real Work:
EL7
andU18
packages on Python 3After v3.3.0
CentOS 7
/RHEL 7
andUbuntu Xenial
will be the only platforms with py2 st2. The biggest amount and careful work is here, https://github.com/stackstorm/st2-packages packaging and making sure we prepare python3 virtualenv st2 packages. This task needs a technical research and thinking how to handle it better:python3
asst2.rpm
dependency for EL7?python3
asst2.deb
dependency for U16?4) Follow-ups
st2
repositoryst2.conf
settings which are py2-only?st2
repository makefiles, build system, etc?Remove Python 2 from the CI build matrix
stackstorm/st2
st2ci
/st2cd
workflowsStackStorm
org reposStackStorm-Exchange
org reposPuppet, Ansible,
Docker, K8s, VagrantThere might be some simple follow-up tasks to update the affected deployment methods for python 3.
I made sure that Docker/K8s is already covered.
Announce that Python 2 was finally Deprecated
As usual, we can announce it via Release Blog post when the py2 breaking change comes into effect. If someone interested to write more dedicated article about Python 2 lifetime and Python 3 plans, - that would be awesome to say "Good bye Python 2" and celebrate that.
Questions
Considering the
py2
->py3
transition path and deprecation warnings, which release version we want to target for the fullpy2
removal?A couple of months ago idea about Python 2 Deprecation Working Group was mentioned. This needs to materialize. Who's involved, who wants to drive, help, contribute, work on these tasks? This is a perfect task to get involved and Contribute.
Please share your ideas, opinions, technical insight or voice for participation.
Removing things should be fun!
Python 2 Deprecation project to be populated with the tasks: https://github.com/orgs/StackStorm/projects/15
The text was updated successfully, but these errors were encountered: