kaxil commented on code in PR #52563:
URL: https://github.com/apache/airflow/pull/52563#discussion_r2175387987


##########
providers/pinecone/src/airflow/providers/pinecone/operators/pinecone.py:
##########
@@ -21,17 +21,18 @@
 from functools import cached_property
 from typing import TYPE_CHECKING, Any
 
-from airflow.models import BaseOperator
 from airflow.providers.pinecone.hooks.pinecone import PineconeHook
+from airflow.providers.pinecone.version_compat import BaseOperator
 
 if TYPE_CHECKING:
     from pinecone import Vector
 
-    try:
+    from airflow.providers.pinecone.version_compat import AIRFLOW_V_3_0_PLUS
+
+    if AIRFLOW_V_3_0_PLUS:
         from airflow.sdk.definitions.context import Context
-    except ImportError:
-        # TODO: Remove once provider drops support for Airflow 2
-        from airflow.utils.context import Context
+    else:
+        from airflow.utils.context import Context  # type: ignore[no-redef]

Review Comment:
   Reverted



-- 
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