eladkal commented on code in PR #41094:
URL: https://github.com/apache/airflow/pull/41094#discussion_r1700080584
##########
airflow/providers/openlineage/extractors/base.py:
##########
@@ -28,14 +28,18 @@
warnings.simplefilter("ignore", DeprecationWarning)
from openlineage.client.facet import BaseFacet as BaseFacet_V1
from openlineage.client.facet_v2 import JobFacet, RunFacet
+from packaging.version import Version
+from airflow import __version__ as AIRFLOW_VERSION
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.state import TaskInstanceState
# this is not to break static checks compatibility with v1 OpenLineage facet
classes
DatasetSubclass = TypeVar("DatasetSubclass", bound=OLDataset)
BaseFacetSubclass = TypeVar("BaseFacetSubclass", bound=Union[BaseFacet_V1,
RunFacet, JobFacet])
+IS_AIRFLOW_2_10_OR_HIGHER = Version(Version(AIRFLOW_VERSION).base_version) >=
Version("2.10.0")
Review Comment:
We have that in the utils. you can just import it from there
https://github.com/apache/airflow/blob/10f250347d17e8f1362e8fffc3dddce655a11cf7/airflow/providers/openlineage/utils/utils.py#L67
--
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]