uranusjr commented on code in PR #43773:
URL: https://github.com/apache/airflow/pull/43773#discussion_r1843370832


##########
providers/src/airflow/providers/common/compat/__init__.py:
##########
@@ -23,17 +23,21 @@
 #
 from __future__ import annotations
 
-import packaging.version
+from packaging.version import Version
 
-from airflow import __version__ as airflow_version
+from airflow import __version__ as AIRFLOW_VERSION
 
 __all__ = ["__version__"]
 
 __version__ = "1.2.2"
 
-if 
packaging.version.parse(packaging.version.parse(airflow_version).base_version) 
< packaging.version.parse(
-    "2.8.0"
-):
+
+AIRFLOW_V_3_0_PLUS = Version(Version(AIRFLOW_VERSION).base_version) >= 
Version("3.0.0")
+AIRFLOW_V_2_10_PLUS = Version(Version(AIRFLOW_VERSION).base_version) >= 
Version("2.10.0")
+AIRFLOW_V_2_9_PLUS = Version(Version(AIRFLOW_VERSION).base_version) >= 
Version("2.9.0")
+AIRFLOW_V_2_8_PLUS = Version(Version(AIRFLOW_VERSION).base_version) >= 
Version("2.8.0")
+
+if Version(Version(AIRFLOW_VERSION).base_version) < Version("2.8.0"):

Review Comment:
   ```suggestion
   if not AIRFLOW_V_2_8_PLUS:
   ```
   
   … right?



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