Skip to content

Conversation

@rich7420
Copy link
Contributor

Replace version-specific conditional imports with common.compat layer. This standardizes compatibility handling across Airflow 2.x and 3.x.

This PR is a part of 57018 about provider celery.


^ 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 airflow-core/newsfragments.

Copy link
Contributor

@bugraoz93 bugraoz93 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 overall! Could you please check the CI, the static checks failing. The Airflow CTL integration tests are fixed in main, rebase should fix that

@rich7420
Copy link
Contributor Author

Looks good overall! Could you please check the CI, the static checks failing. The Airflow CTL integration tests are fixed in main, rebase should fix that

OK! thanks for your feedback!

@rich7420 rich7420 force-pushed the AIRFLOW57018-celery branch from 392ebb8 to 615a003 Compare October 22, 2025 15:56
Comment on lines 72 to 74
"common.compat" = [
"apache-airflow-providers-common-compat>=1.7.4", # + TODO: bump to next version
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why as optional dependency?

Copy link
Contributor Author

@rich7420 rich7420 Oct 22, 2025

Choose a reason for hiding this comment

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

You're right , my mistake.

@rich7420 rich7420 requested a review from vincbeck as a code owner October 22, 2025 17:19
Comment on lines 72 to 74
"common.compat" = [
"apache-airflow-providers-common-compat>=1.7.4", # + TODO: bump to next version
]
Copy link
Contributor

Choose a reason for hiding this comment

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

This has to go to "dependencies"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@amoghrajesh Yes! You're right. Thanks for your feedback!

@kaxil
Copy link
Member

kaxil commented Oct 23, 2025

Static check failure

@rich7420
Copy link
Contributor Author

Static check failure

OK! I'll try to resolve it. But actually I don't why that test failed.
I'll try to figure out.

Update providers build files.....................................................Failed
- hook id: update-providers-build-files
- files were modified by this hook

rich7420 and others added 6 commits October 24, 2025 22:00
Added a TODO comment to indicate the need to bump the version of 'apache-airflow-providers-common-compat'.
- Move 'from airflow.providers.common.compat.sdk import timeout' to top of file
- Fixes E402 Module level import not at top of file error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants