diff --git a/airflow/upgrade/rules/import_changes.py b/airflow/upgrade/rules/import_changes.py index 24fb6e9369fcd..f0089ecc0cd1b 100644 --- a/airflow/upgrade/rules/import_changes.py +++ b/airflow/upgrade/rules/import_changes.py @@ -127,7 +127,7 @@ def _check_file(file_path): def _check_missing_providers(providers): current_airflow_version = Version(__import__("airflow").__version__) - if current_airflow_version.major >= 2: + if current_airflow_version >= Version("2.0.0"): prefix = "apache-airflow-providers-" else: prefix = "apache-airflow-backport-providers-"