Andrushika opened a new pull request, #76910: URL: https://github.com/apache/airflow/pull/76910
## Why `task-sdk/src/airflow/sdk/definitions/dag.py` imports `airflow.settings` at module level. It reads one value from it: the default timezone of a new Dag. Loading `airflow.settings` also loads core `configuration`, so every Dag file loads core config. Each `DAG(...)` also imports core `airflow.timetables.base` to check the schedule type. ## What The default timezone now comes from the SDK timezone module. `airflow.sdk.timezone` sets it from the same `[core] default_timezone` option. The schedule check now uses core `Timetable` only when core already loaded that module. If the module is not loaded, the schedule cannot be an instance of it. One difference: a `TIMEZONE` set in `airflow_local_settings.py` no longer changes the default timezone of SDK Dags. This override is not documented. On its own this does not make imports faster, because `airflow/__init__.py` still initializes core. It is part 2 of the plan in #<P1>. This does not depend on #<P1>, and it can be reviewed and merged on its own. related: #<P1> related: https://lists.apache.org/thread/1nhdc8y1x7dclcpcck98q5chzh1tvodk --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
