Jarek Potiuk created AIRFLOW-6010:
-------------------------------------

             Summary: The "from airflow import settings" is used far too often
                 Key: AIRFLOW-6010
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6010
             Project: Apache Airflow
          Issue Type: Sub-task
          Components: core
    Affects Versions: 2.0.0
            Reporter: Jarek Potiuk


In many places "from airflow import settings" is used only to get the latest 
set value of one or few settings or when single method from settings is going 
to be called.

Settings loads a lot of dependencies on its own and having it imported at the 
top of the file often causes many transitive/implicit dependencies which might 
cause circular imports.

Therefore in many places the settings should be imported as local imports. This 
causes lasy-loading of settings in case of tests but also it makes sure that 
even if the values in settings are overridden by some other initialisation, we 
will always use latest version of settings.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to