[ https://issues.apache.org/jira/browse/AIRFLOW-6010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Potiuk updated AIRFLOW-6010: ---------------------------------- Description: Context for DAG context management was loaded from settings and it causede some cycles detected by pylint. Now context management functionality is moved to DAG and 'import settings' is not needed in baseoperator, subdag_operator. was: 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. > 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 > Priority: Major > > Context for DAG context management was loaded from settings and > it causede some cycles detected by pylint. Now context management > functionality is moved to DAG and 'import settings' is not needed > in baseoperator, subdag_operator. -- This message was sent by Atlassian Jira (v8.3.4#803005)