amoghrajesh commented on code in PR #47644: URL: https://github.com/apache/airflow/pull/47644#discussion_r2004820681
########## airflow/models/taskinstance.py: ########## @@ -124,6 +124,12 @@ from airflow.utils.task_instance_session import set_current_task_instance_session from airflow.utils.timeout import timeout from airflow.utils.xcom import XCOM_RETURN_KEY +from airflow.version_compat import AIRFLOW_V_3_0_PLUS + +if AIRFLOW_V_3_0_PLUS: + from airflow.sdk.execution_time.context import context_to_airflow_vars +else: + from airflow.utils.operator_helpers import context_to_airflow_vars # type: ignore[no-redef, attr-defined] Review Comment: For core (non providers), we do not need to do this exercise of v3 check as we can introduce breaking changes with 3.0, the issue is for providers as its a different package relying on core airflow. For those, we need those checks. -- 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]
