Skip to content
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

update builtin collections imports to be forward-compatible with Python3.10+ #253

Merged
merged 25 commits into from
Oct 18, 2023

Conversation

AndroxxTraxxon
Copy link
Contributor

Python 3.10 removes the deprecated aliases to the Collections abstract base classes, which was done in Python 3.3
Python3.10 Changelog:

Remove deprecated aliases to Collections Abstract Base Classes from the collections module. (Contributed by Victor Stinner in bpo-37324.)

This change refactors the imports in 2 files that were still using this deprecated import style to one that is more globally supported.

https://docs.python.org/3/whatsnew/3.10.html#removed

updating workflow to user currently supported versioning syntax
The setup-python action@v2 does not accommodate for the fact that there is no python3.6 release for ubuntu 22, so we need to upgrade the version to allow for backwards compatibility.
@AndroxxTraxxon
Copy link
Contributor Author

I had to tweak the tox.yml build because ubuntu-latest no longer supports python3.6, so I tried to set up the test matrix to cover all the appropriate python versions across multiple ubuntu versions

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

We need an updated changelog and a 🟢 build to merge it.
I know it's not related to your PR, but if you have a few cycles to look into it, - that'll help to move forward with it.

@AndroxxTraxxon
Copy link
Contributor Author

I've updated the changelog as requested, but I have no idea where to start looking for these tests. do you have any idea where a good place to start would be?

@arm4b
Copy link
Member

arm4b commented Sep 20, 2023

From https://github.com/StackStorm/orquesta/actions, the latest green build was in the https://github.com/StackStorm/orquesta/pull/256/files

I think it makes sense to fix master branch first, by taking from that PR adjustments to the GH Actions and tests. Once the master is green, the build in this PR would be easier to adjust.

CHANGELOG.rst Outdated Show resolved Hide resolved
Comment on lines 18 to 26
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
exclude:
- python-version: "3.10"
os: ubuntu-20.04
- python-version: "3.6"
os: ubuntu-22.04
- python-version: "3.6"
os: ubuntu-latest
runs-on: ${{matrix.os}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Because we're testing python and not OS at this level, from this build matrix, I think it makes sense to just have 1 environment for reach python version:

  • 3.6, ubuntu-20.04
  • 3.8, ubuntu-22.04

should simplify it a bit, unless you had specific reason to have a wider build matrix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here https://github.com/StackStorm/orquesta/pull/256/files#diff-8a1944567ec5d9e12aaaac28489c47e6567e13b58d861815379f9b8d3aeb2623R15 the build was green by using ubuntu-20.04 environment for both py3.6 and py3.8.
Maybe that's the reason of so many unit test fails in this PR build? Worth checking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, those are some really useful points.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndroxxTraxxon The CI is fixed here #257 and is now ✅ on master, thanks to @amanda11 and @nzlosh.

Please sync your work with the master branch.

Co-authored-by: Eugen C. <1533818+armab@users.noreply.github.com>
@nzlosh
Copy link
Contributor

nzlosh commented Oct 10, 2023

I'd be inclined to drop 3.6 from the matrix and add py3.9 + py.311

Remove tests for 3.10 -- the package isn't ready yet.
@AndroxxTraxxon
Copy link
Contributor Author

I'd be include to drop 3.6 from the matrix and add py3.9 + py.311

I'd be okay adding 3.9, but the project isn't ready for 3.10+. Between the nose tests and the pip version, there are still a bunch of items that need to be addressed before 3.10 is possible.

@CLAassistant
Copy link

CLAassistant commented Oct 10, 2023

CLA assistant check
All committers have signed the CLA.

@AndroxxTraxxon
Copy link
Contributor Author

Per today's TSC meeting, I dropped support (and testing) for Python 3.6, and added testing against 3.9, 3.10, and 3.11

@arm4b
Copy link
Member

arm4b commented Oct 10, 2023

I think we still need python3.6 for releasing a v3.8.1 patch version first which should be backwards-compatible.
We can drop Python3.6 for the bigger release v3.9.0 after that.

So please keep the py3.6 in this PR which could be dropped after releasing a patch version.

Alternative is to postpone merging this one until making an orquesta patch version to be used in the stackstorm/st2.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, great work! 💯

Copy link
Contributor

@nzlosh nzlosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Great job! LGTM

@AndroxxTraxxon
Copy link
Contributor Author

What else needs to happen to merge this?

@nzlosh
Copy link
Contributor

nzlosh commented Oct 12, 2023

@armab I initially asked for support for py3.11 and drop py3.6 because an st2 3.8.1 release wasn't a consideration. As the 3.8.1 release manager, do you want to merge this for st2 3.8.1 or hold for st2 3.9?

@amanda11
Copy link
Contributor

@armab I initially asked for support for py3.11 and drop py3.6 because an st2 3.8.1 release wasn't a consideration. As the 3.8.1 release manager, do you want to merge this for st2 3.8.1 or hold for st2 3.9?

I think we should merge, but @armab up to you. This just adds us running the tests on the extra python, and doesn't affect us still releasing ST2 only on 3.6 and 3.8 for 3.8.1 release.

@AndroxxTraxxon
Copy link
Contributor Author

Hi @armab, I noticed that you did add this PR to the 3.8.1 release tracker. Were you looking for anything else in the PR before we merge it, or did we want to leave this until st2 v3.9.0?

@arm4b
Copy link
Member

arm4b commented Oct 18, 2023

Yeah, I think it's OK to use the same orquesta = 1.6.0 (to be released) for both v3.8.1 and potentially v3.9.0 as there were no major additions or breaking changes. This one should work fine with py3.6 as well.

Merging it, thanks everyone!

@arm4b arm4b merged commit efd5bb4 into StackStorm:master Oct 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants