You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/18 10:32:01 UTC

[GitHub] [airflow] ashb edited a comment on issue #6597: [AIRFLOW-6005] Remove airflow airflow exception imports. Depends on [AIRFLOW-6004]

ashb edited a comment on issue #6597: [AIRFLOW-6005] Remove airflow airflow exception imports. Depends on [AIRFLOW-6004]
URL: https://github.com/apache/airflow/pull/6597#issuecomment-554953029
 
 
   Oh, I think I see the issue with both of my comments:
   
   Because `airflow/__init__.py` unconditionally imports `from airflow.deprecations import AirflowException` it would always run.
   
   ~Could we use https://docs.python.org/3/library/importlib.html#importlib.util.LazyLoader (new in v3.5) instead?~ That doesn't seem to work for an `pip install -e` environment so no. https://pypi.org/project/lazy-import/ might be an option though
   
   And as for the "two candidates for AirflowException class in autoapi generation": putting `__all__ = ['AirflowException']` in the airflow/deprecations/airflow_exception_deprecated.py might help with that.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services