dstandish opened a new pull request, #44607:
URL: https://github.com/apache/airflow/pull/44607
The point of this helper is to make it simpler to figure out what airflow
version is installed, in particular to implement conditional logic in providers.
Currently the logic is too complicated and this has resulted in the
proliferation of sort of redundant constants. Here's an example:
```
from airflow import __version__ as AIRFLOW_VERSION
AIRFLOW_V_3_0_PLUS = Version(Version(AIRFLOW_VERSION).base_version) >=
Version("3.0.0")
if AIRFLOW_V_3_0_PLUS:
from airflow.sdk.definitions.asset import Asset
```
With this helper, we can do this instead:
```
from airflow import get_airflow_version
if get_airflow_version() > Version("3.0.0"):
from airflow.sdk.definitions.asset import Asset
```
--
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]