ashb commented on PR #31379:
URL: https://github.com/apache/airflow/pull/31379#issuecomment-1553070856
I tested this on 2.3.0 and 2.4.0 and it works.
```python
try:
form airflow import version as airflow_version
except ImportError:
form airflow.version import version as airflow_version
if packaging.version.parse(airflow_version) <
packaging.version.parse("2.4.0"):
```
I even set the min dep to 2.4.1 to double check, all good.
AttributeError is never thrown if we do the `from ... import` -- the python
import machinery handles that and throws `ImportError: cannot import name
'__version__' from 'airflow'`.
--
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]