Move user-facing utilities from airflow.utils.* to Task SDK definitions
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Description
Move user-facing utilities from airflow.utils.* directly into Task SDK definition modules where they logically belong, creating deprecation shims for backward compatibility.
Files to move:
- airflow.utils.state → airflow.sdk.definitions.state
- airflow.utils.trigger_rule → airflow.sdk.definitions.trigger_rule
- airflow.utils.weight_rule → airflow.sdk.definitions.weight_rule
- airflow.utils.types → airflow.sdk.definitions.types
- airflow.utils.operator_resources → airflow.sdk.definitions.resources
- airflow.utils.task_group → merge into airflow.sdk.definitions.taskgroup
- airflow.utils.context → merge into airflow.sdk.definitions.context
- airflow.utils.decorators → merge into airflow.sdk.definitions.decorators
- airflow.utils.module_loading → airflow.sdk.definitions._internal.module_loading
- airflow.utils.helpers → airflow.sdk.definitions._internal.templating
### Use case/motivation
_No response_
### Related issues
https://github.com/apache/airflow/issues/51671
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Start by comparing the listed airflow.utils modules with their airflow.sdk.definitions targets, including the taskgroup, context, decorators, _internal.module_loading, and _internal.templating modules. Read related issue #51671 before planning the migration. Done means the utilities are in the specified SDK locations and the old paths retain backward-compatible deprecation shims.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100