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

Check python version that was used to install pre-commit venvs (#43282) #43310

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Oct 23, 2024

Since we moved to Python 3.9 and started usign 3.9+ only features line functools.cache, having Python 3.8 as default python version will result in virtualenvs created with outdated python.

This pre-commit checks what is the global version of python3 and it will complain if it is lower than 3.9. This is done via explicit call of "python3", because this is what pre-commit does. Also global setting is needed because otherwise new virtualenvs created by pre-commit might be created using lower python version.

(cherry picked from commit 076da92)


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

…e#43282)

Since we moved to Python 3.9 and started usign 3.9+ only features
line functools.cache, having Python 3.8 as default python version
will result in virtualenvs created with outdated python.

This pre-commit checks what is the global version of python3 and it
will complain if it is lower than 3.9. This is done via explicit
call of "python3", because this is what pre-commit does. Also
global setting is needed because otherwise new virtualenvs
created by pre-commit might be created using lower python version.

(cherry picked from commit 076da92)
@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2024

Backport of #43282 -> Updated here for Python "3.8" - @jscheffl , you will have to update it later as well in #42788

@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2024

Failed tests fixed already in tip of 2-10-test. merging

@potiuk potiuk merged commit f4da099 into apache:v2-10-test Oct 23, 2024
69 of 70 checks passed
@potiuk potiuk deleted the check-python-version branch October 23, 2024 14:44
jscheffl added a commit that referenced this pull request Oct 23, 2024
@utkarsharma2 utkarsharma2 added the type:misc/internal Changelog: Misc changes that should appear in change log label Oct 24, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.3 milestone Oct 24, 2024
utkarsharma2 pushed a commit that referenced this pull request Oct 24, 2024
… (#43310)

Since we moved to Python 3.9 and started usign 3.9+ only features
line functools.cache, having Python 3.8 as default python version
will result in virtualenvs created with outdated python.

This pre-commit checks what is the global version of python3 and it
will complain if it is lower than 3.9. This is done via explicit
call of "python3", because this is what pre-commit does. Also
global setting is needed because otherwise new virtualenvs
created by pre-commit might be created using lower python version.

(cherry picked from commit 076da92)
jscheffl added a commit that referenced this pull request Oct 24, 2024
jscheffl added a commit that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants