amoghrajesh commented on code in PR #53389:
URL: https://github.com/apache/airflow/pull/53389#discussion_r2290009694


##########
devel-common/src/tests_common/test_utils/compat.py:
##########
@@ -64,6 +64,13 @@
     from airflow.utils.xcom import XCOM_RETURN_KEY  # type: 
ignore[no-redef,attr-defined]
 
 
+try:
+    from airflow.sdk import TriggerRule
+except ImportError:
+    # Compatibility for Airflow < 3.1
+    from airflow.utils.trigger_rule import TriggerRule  # type: 
ignore[no-redef,attr-defined]

Review Comment:
   Cool, make a note of it



##########
performance/src/performance_dags/performance_dag/performance_dag.py:
##########
@@ -57,7 +57,12 @@
 from airflow.operators.bash import BashOperator
 from airflow.operators.python import PythonOperator
 from airflow.sdk import chain
-from airflow.utils.trigger_rule import TriggerRule
+
+try:
+    from airflow.sdk import TriggerRule
+except ImportError:
+    # Compatibility for Airflow < 3.1
+    from airflow.utils.trigger_rule import TriggerRule  # type: 
ignore[no-redef,attr-defined]

Review Comment:
   Yep, sounds good!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to