You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2025/07/01 05:59:11 UTC
Re: [PR] Update BaseOperator and BaseSensorOperator imports for Airflow 3.0 compatibility in redis provider [airflow]
uranusjr commented on code in PR #52597:
URL: https://github.com/apache/airflow/pull/52597#discussion_r2176495423
##########
providers/redis/src/airflow/providers/redis/version_compat.py:
##########
@@ -33,3 +33,11 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
+
+if AIRFLOW_V_3_0_PLUS:
+ from airflow.sdk import BaseOperator, BaseSensorOperator
+else:
+ from airflow.models import BaseOperator
+ from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
+
+__all__ = ["AIRFLOW_V_3_0_PLUS", "BaseOperator", "BaseSensorOperator"]
Review Comment:
After the removal of AIRFLOW_V_3_0_PLUS in redis_pub_sub.py, do we still need to expose this value in `__all__`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org