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

Limit Airflow and breeze to < 3.12 #35123

Merged
merged 1 commit into from Oct 25, 2023
Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Oct 23, 2023

Python 3.12 has a few breaking changes comparing to earlier versions. While 3.7 - 3.11 were largely backwards compatible, Python 3.12 is the first one for a long time that started to break things more aggressively.

For now we know that Airflow will not work with Python 3.12 mainly because of distutils removal (https://peps.python.org/pep-0632/) and not because of Airflow's usage of it but pendulum's before version 3.

While we are working on getting Pendulum 3 support in #34744 and the #34746, there are likely other dependencies that have similar issue.

Until we fix it and add official 3.12 support, we can limit airflow to not be installable on 3.12.


^ 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.

Python 3.12 has a few breaking changes comparing to earlier versions.
While 3.7 - 3.11 were largely backwards compatible, Python 3.12 is the
first one for a long time that started to break things more
aggressively.

For now we know that Airflow will not work with Python 3.12 mainly
because of distutils removal (https://peps.python.org/pep-0632/) and
not because of Airflow's usage of it but pendulum's before version 3.

While we are working on getting Pendulum 3 support in apache#34744 and
the apache#34746, there are likely other dependencies that have similar
issue.

Until we fix it and add official 3.12 support, we can limit airflow
to not be installable on 3.12.
@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2023

I opened a PR but I am not sure if this is the best idea (devlist message to follow)

@uranusjr
Copy link
Member

Is there an example of how the distutils removal affects breeze?

@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2023

Is there an example of how the distutils removal affects breeze?

Just pendulum installation in some cases and os systems example in this thread from Slack:

https://apache-airflow.slack.com/archives/CCQ7EGB1P/p1697895028537189

image

@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2023

Even though we do not pin pendulum there, likely other dependencies of breeze do.

@uranusjr
Copy link
Member

Yeah that looks like not specific to Pendulum but from Poetry. This is the best of the non-optimal solutions.

@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2023

BTW. As mentioned in the devlist thread https://lists.apache.org/thread/ogzt5y84vqh4rrbdyrdprgrb07ncd8hk - i now think it's better to error out rather than add install-requires, because it will not prevent those kind of errors for Airflow (this might still be a good idea for breeze though as it is installed from source requirements in main). Converting to draft until we have more voices there.

@potiuk potiuk marked this pull request as draft October 23, 2023 14:26
@potiuk
Copy link
Member Author

potiuk commented Oct 23, 2023

Yeah that looks like not specific to Pendulum but from Poetry. This is the best of the non-optimal solutions.

How do you know it's poetry that's involved BTW @uranusjr ?

@uranusjr
Copy link
Member

It looks like Pendulum uses Poetry’s extension-building functionality to build the C extension. The failure comes from its build script that imports distutils.

@potiuk
Copy link
Member Author

potiuk commented Oct 24, 2023

It looks like Pendulum uses Poetry’s extension-building functionality to build the C extension. The failure comes from its build script that imports distutils.

🤯 🤯 🤯 🤯 🤯 🤯

@potiuk potiuk marked this pull request as ready for review October 25, 2023 10:15
@potiuk potiuk merged commit 020691f into apache:main Oct 25, 2023
67 checks passed
@potiuk potiuk deleted the limit-python-3.12 branch October 25, 2023 10:17
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.3 milestone Oct 27, 2023
@ephraimbuddy ephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Oct 27, 2023
potiuk added a commit that referenced this pull request Oct 29, 2023
Python 3.12 has a few breaking changes comparing to earlier versions.
While 3.7 - 3.11 were largely backwards compatible, Python 3.12 is the
first one for a long time that started to break things more
aggressively.

For now we know that Airflow will not work with Python 3.12 mainly
because of distutils removal (https://peps.python.org/pep-0632/) and
not because of Airflow's usage of it but pendulum's before version 3.

While we are working on getting Pendulum 3 support in #34744 and
the #34746, there are likely other dependencies that have similar
issue.

Until we fix it and add official 3.12 support, we can limit airflow
to not be installable on 3.12.

(cherry picked from commit 020691f)
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.

None yet

3 participants