Clean up usages of `DeprecationWarning` across airflow-core
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Body
A better way to deprecate airflow features would be to use `DeprecatedImportWarning` instead of `DeprecationWarning`, introduced here: https://github.com/apache/airflow/pull/55881.
### DeprecationWarning occurrences
| Done | File Path | # Occurrences |
|------|-----------------------------------------------|--------------|
| [ ] | `airflow/__init__.py` | 1 |
| [ ] | `airflow/configuration.py` | 8 |
| [ ] | `airflow/exceptions.py` | 3 |
| [ ] | `airflow/logging_config.py` | 1 |
| [ ] | `airflow/providers_manager.py` | 1 |
| [ ] | `airflow/settings.py` | 1 |
| [ ] | `airflow/api_fastapi/core_api/app.py` | 1 |
| [ ] | `airflow/cli/commands/connection_command.py` | 1 |
| [ ] | `airflow/dag_processing/bundles/base.py` | 1 |
| [ ] | `airflow/dag_processing/bundles/manager.py` | 1 |
| [ ] | `airflow/datasets/__init__.py` | 1 |
| [ ] | `airflow/datasets/metadata.py` | 1 |
| [ ] | `airflow/models/connection.py` | 2 |
| [ ] | `airflow/models/dag.py` | 1 |
| [ ] | `airflow/models/variable.py` | 4 |
| [ ] | `airflow/secrets/__init__.py` | 1 |
| [ ] | `airflow/timetables/datasets.py` | 1 |
| [ ] | `airflow/utils/dag_cycle_tester.py` | 1 |
| [ ] | `airflow/utils/dag_parsing_context.py` | 1 |
| [ ] | `airflow/utils/helpers.py` | 3 |
| [ ] | `airflow/utils/state.py` | 1 |
| [ ] | `airflow/configuration.py` *(comment)* | 1 |
✅ **Total:** 37 occurrences across 22 files.
### 🧪 How to Test
A good way to verify the changes is by running a DAG that uses the **deprecated import**:
1. Create a simple DAG that uses one of the **old/deprecated imports** (e.g., importing a module or class that triggers the warning).
2. Trigger the DAG manually via UI.
3. Check the **task logs** in the UI.
You should see a **`DeprecatedImportWarning`** in the logs for old imports.
### Committer
- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Contributor guide
Assessment
This issue has not been assessed yet.