Skip to content

Restore python 3.6 support#4958

Merged
pavera merged 6 commits intomainfrom
pavera/update-python-helpers-for-2287
Apr 8, 2022
Merged

Restore python 3.6 support#4958
pavera merged 6 commits intomainfrom
pavera/update-python-helpers-for-2287

Conversation

@pavera
Copy link
Copy Markdown
Contributor

@pavera pavera commented Apr 5, 2022

This PR restores python 3.6 support by allowing version ranges for pip and pip-tools. The latest versions of these dependencies no longer support python 3.6, so we need to allow earlier versions.

Looking into an issue creating PRs for a python repo found that if you specify a python version, IE 3.6.8 for your repo, then when we attempt to create the 3.6.8 pyenv and pip install -r python/helpers/requirements.txt it fails because some dependencies in this helper have removed python 3.6 support in their latest versions.

I'm not clear on whether dependabot will just immediately try to bump these versions again? If it will what is the correct way to pin these versions back?

I'd like to add tests as well, but need a pointer or 2 about where to add such "integration" type tests.

pavera added 2 commits April 5, 2022 15:31
Make these versions more flexible so that we continue to support python 3.6
@pavera pavera marked this pull request as ready for review April 6, 2022 12:50
@pavera pavera requested a review from a team as a code owner April 6, 2022 12:50
@pavera pavera requested a review from jakecoffman April 6, 2022 21:10
@jakecoffman
Copy link
Copy Markdown
Member

This makes sense now that I learned the Python helpers are run with the target version of Python.

Many of the spec are integration style tests already, they make calls to GitHub and compile external code! So maybe stick a new test in pip_compile_file_updater_spec.rb?

Also, I noticed this file

SUPPORTED_VERSIONS = %w(
3.10.3 3.10.2 3.10.1 3.10.0
3.9.10 3.9.9 3.9.8 3.9.7 3.9.6 3.9.5 3.9.4 3.9.2 3.9.1 3.9.0
3.8.12 3.8.11 3.8.10 3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 3.8.2 3.8.1 3.8.0
3.7.12 3.7.11 3.7.10 3.7.9 3.7.8 3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.7.2 3.7.1 3.7.0
3.6.15 3.6.14 3.6.13 3.6.12 3.6.11 3.6.10 3.6.9 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3
3.6.2 3.6.1 3.6.0 3.5.10 3.5.8 3.5.7 3.5.6 3.5.5 3.5.4 3.5.3
).freeze

Should we test back to 3.5.3? 🤔

@pavera
Copy link
Copy Markdown
Contributor Author

pavera commented Apr 6, 2022

Yeah, I also had read the version file, going back to 3.5 pulls these two packages back quite a ways. I figured I'd wait and see on that. 3.6 is already eol, but ubuntu 18.04 is still supported and that is the official python version there. Not sure if there are any supported distros that are keeping 3.5 alive still (rhel/centos maybe?)

Good to know about the tests, I will endeavor to add one for this case.

Copy link
Copy Markdown
Member

@jakecoffman jakecoffman left a comment

Choose a reason for hiding this comment

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

Looks good, nice work! 👏

@pavera pavera merged commit 0d34061 into main Apr 8, 2022
@pavera pavera deleted the pavera/update-python-helpers-for-2287 branch April 8, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants