JDarDagran commented on code in PR #39530:
URL: https://github.com/apache/airflow/pull/39530#discussion_r1686556372


##########
airflow/providers/openlineage/extractors/base.py:
##########
@@ -17,27 +17,34 @@
 
 from __future__ import annotations
 
+import warnings
 from abc import ABC, abstractmethod
-from typing import TYPE_CHECKING
+from typing import Generic, TypeVar, Union
 
 from attrs import Factory, define
+from openlineage.client.event_v2 import Dataset as OLDataset
+
+with warnings.catch_warnings():
+    warnings.simplefilter("ignore", DeprecationWarning)
+    from openlineage.client.facet import BaseFacet as BaseFacet_V1

Review Comment:
   That is for any other integrations that did not already migrate to v2. It's 
only for static analysis but it felt safer to do it this way.



##########
airflow/providers/openlineage/extractors/base.py:
##########
@@ -17,27 +17,34 @@
 
 from __future__ import annotations
 
+import warnings
 from abc import ABC, abstractmethod
-from typing import TYPE_CHECKING
+from typing import Generic, TypeVar, Union
 
 from attrs import Factory, define
+from openlineage.client.event_v2 import Dataset as OLDataset
+
+with warnings.catch_warnings():
+    warnings.simplefilter("ignore", DeprecationWarning)
+    from openlineage.client.facet import BaseFacet as BaseFacet_V1

Review Comment:
   That is for any other providers that did not already migrate to v2. It's 
only for static analysis but it felt safer to do it this way.



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to