Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions airflow-core/docs/installation/upgrading_to_airflow3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,68 @@ To trigger these fixes, run the following command:

You can also configure these flags through configuration files. See `Configuring Ruff <https://docs.astral.sh/ruff/configuration/>`_ for details.

Key Import Updates
^^^^^^^^^^^^^^^^^^

While ruff can automatically fix many import issues, here are the key import changes you'll need to make to ensure your DAGs and other
code import Airflow components correctly in Airflow 3. The older paths are deprecated and will be removed in a future Airflow version.

.. list-table::
:header-rows: 1
:widths: 50, 50

* - **Old Import Path (Deprecated)**
- **New Import Path (airflow.sdk)**
* - ``airflow.decorators.dag``
- ``airflow.sdk.dag``
* - ``airflow.decorators.task``
- ``airflow.sdk.task``
* - ``airflow.decorators.task_group``
- ``airflow.sdk.task_group``
* - ``airflow.decorators.setup``
- ``airflow.sdk.setup``
* - ``airflow.decorators.teardown``
- ``airflow.sdk.teardown``
* - ``airflow.models.dag.DAG``
- ``airflow.sdk.DAG``
* - ``airflow.models.baseoperator.BaseOperator``
- ``airflow.sdk.BaseOperator``
* - ``airflow.models.param.Param``
- ``airflow.sdk.Param``
* - ``airflow.models.param.ParamsDict``
- ``airflow.sdk.ParamsDict``
* - ``airflow.models.baseoperatorlink.BaseOperatorLink``
- ``airflow.sdk.BaseOperatorLink``
* - ``airflow.sensors.base.BaseSensorOperator``
- ``airflow.sdk.BaseSensorOperator``
* - ``airflow.hooks.base.BaseHook``
- ``airflow.sdk.BaseHook``
* - ``airflow.notifications.basenotifier.BaseNotifier``
- ``airflow.sdk.BaseNotifier``
* - ``airflow.utils.task_group.TaskGroup``
- ``airflow.sdk.TaskGroup``
* - ``airflow.datasets.Dataset``
- ``airflow.sdk.Asset``
* - ``airflow.datasets.DatasetAlias``
- ``airflow.sdk.AssetAlias``
* - ``airflow.datasets.DatasetAll``
- ``airflow.sdk.AssetAll``
* - ``airflow.datasets.DatasetAny``
- ``airflow.sdk.AssetAny``
* - ``airflow.models.connection.Connection``
- ``airflow.sdk.Connection``
* - ``airflow.models.context.Context``
- ``airflow.sdk.Context``
* - ``airflow.models.variable.Variable``
- ``airflow.sdk.Variable``
* - ``airflow.io.*``
- ``airflow.sdk.io.*``

**Migration Timeline**

- **Airflow 3.1**: Legacy imports show deprecation warnings but continue to work
- **Future Airflow version**: Legacy imports will be **removed**

Step 4: Install the Standard Provider
--------------------------------------

Expand Down
Loading