-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix several deprecation warnings related to airflow.sdk #53791
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes several deprecation warnings related to the transition from legacy Airflow modules to the new airflow.sdk package structure. The changes update import statements to use the recommended SDK modules instead of the deprecated legacy modules.
Key changes:
- Update imports for BaseOperator from
airflow.models.baseoperatortoairflow.sdk.bases.operator - Update timezone-related imports from
airflow.utils.timezonetoairflow.sdk.timezone - Add version compatibility checks to conditionally import from the appropriate module based on Airflow version
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
providers/standard/src/airflow/providers/standard/sensors/time.py |
Updates timezone import to use SDK module |
providers/standard/src/airflow/providers/standard/operators/hitl.py |
Updates BaseOperator import to use SDK module |
providers/standard/src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py |
Updates datetime import to use SDK timezone module |
devel-common/src/tests_common/test_utils/mock_operators.py |
Adds version compatibility for BaseOperator import with conditional logic |
airflow-core/tests/unit/cli/commands/test_dag_command.py |
Adds version compatibility for BaseOperator import with conditional logic |
|
There are some errors though :( |
ccf63fe to
fb4799f
Compare
|
Fixed now! |
amoghrajesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dev-iL thanks for working on this, a general set of comments that apply throughout the PR.
providers/standard/src/airflow/providers/standard/operators/hitl.py
Outdated
Show resolved
Hide resolved
fb4799f to
00325ad
Compare
providers/standard/tests/unit/standard/sensors/test_date_time.py
Outdated
Show resolved
Hide resolved
providers/standard/tests/unit/standard/sensors/test_time_delta.py
Outdated
Show resolved
Hide resolved
555f0a9 to
be17494
Compare
+ Some ruff violations related to the performance tests.
be17494 to
8568091
Compare
+ Some ruff violations related to the performance tests.
+ Some ruff violations related to the performance tests.
Fixing some deprecations reported by breeze:
CC: @amoghrajesh
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.