You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ashb (via GitHub)" <gi...@apache.org> on 2023/05/18 10:52:52 UTC

[GitHub] [airflow] ashb commented on pull request #31379: fixing circular import error in providers caused by airflow version check

ashb commented on PR #31379:
URL: https://github.com/apache/airflow/pull/31379#issuecomment-1552878980

   > then maybe we can try something like the following?
   > 
   > ```python
   > try:
   >     airflow_version = airflow.__version__
   > except ImportError:
   >     airflow_version = airflow.version.version
   > 
   > if packaging.version.parse(airflow_version) < packaging.version.parse("2.4.0"):
   > ... 
   > ```
   
   I think it's AttributeError (at least by your original error message) but yes.


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

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