Skip to content

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Apr 7, 2025

closes #48811

Old Paths:

from airflow.decorators import dag, task, setup, teardown, task_group

New Paths:

from airflow.sdk import dag, task, setup, teardown, task_group

Backwards compatibility has been maintained.

The Base class has been moved to airflow.sdk.bases.decorator


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

@ashb ashb left a comment

Choose a reason for hiding this comment

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

I think we might need the .pyi file for decorators moved across too.

@kaxil
Copy link
Member Author

kaxil commented Apr 7, 2025

I think we might need the .pyi file for decorators moved across too.

Yeah its moved -> https://github.com/apache/airflow/blob/015a8c60924025a804976b8f52a9ec3cd943c0d1/task-sdk/src/airflow/sdk/definitions/decorators/__init__.pyi

@kaxil kaxil force-pushed the get-task-decorator-working branch from 015a8c6 to 6a8e41f Compare April 7, 2025 21:47
@kaxil kaxil requested a review from gopidesupavan as a code owner April 7, 2025 21:47
@kaxil kaxil force-pushed the get-task-decorator-working branch 2 times, most recently from 36159c8 to 783f9ff Compare April 7, 2025 23:23
@kaxil kaxil force-pushed the get-task-decorator-working branch from 783f9ff to 2e2db3d Compare April 8, 2025 00:27
@kaxil kaxil merged commit 86d5b27 into apache:main Apr 8, 2025
95 checks passed
@kaxil kaxil deleted the get-task-decorator-working branch April 8, 2025 01:13
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
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.

Make @task import from airflow.sdk

2 participants