Skip to content

airflow3-suggested-to-move-to-provider (AIR312)

Derived from the Airflow linter.

This rule is unstable and in preview. The --preview flag is required for use.

What it does

Checks for uses of Airflow functions and values that have been moved to its providers but still have a compatibility layer (e.g., apache-airflow-providers-standard).

Why is this bad?

Airflow 3.0 moved various deprecated functions, members, and other values to its providers. Even though these symbols still work fine on Airflow 3.0, they are expected to be removed in a future version. The user is suggested to install the corresponding provider and replace the original usage with the one in the provider.

Example

from airflow.operators.python import PythonOperator

Use instead:

from airflow.providers.standard.operators.python import PythonOperator