jason810496 commented on code in PR #52325: URL: https://github.com/apache/airflow/pull/52325#discussion_r2313763247
########## providers/common/io/tests/unit/common/io/xcom/test_backend.py: ########## @@ -24,14 +24,20 @@ import airflow.models.xcom from airflow.providers.common.io.xcom.backend import XComObjectStorageBackend from airflow.providers.standard.operators.empty import EmptyOperator -from airflow.utils import timezone + +try: + from airflow.utils import timezone # type: ignore[attr-defined] +except ImportError: + from airflow.sdk import timezone from tests_common.test_utils import db from tests_common.test_utils.config import conf_vars -from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, XCOM_RETURN_KEY +from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_V_3_1_PLUS, XCOM_RETURN_KEY pytestmark = [pytest.mark.db_test] +if AIRFLOW_V_3_1_PLUS: + from airflow.models.xcom import XComModel Review Comment: We need `if AIRFLOW_V_3_1_PLUS` for compatible import. Resolved. -- 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]
