From a519cdac91d29722d16511096e45753c579652fa Mon Sep 17 00:00:00 2001 From: Kushagra Gupta Date: Thu, 6 Aug 2026 00:08:56 +0530 Subject: [PATCH] Fix __getattr__ in helpers.py to properly import dotted module paths --- airflow-core/src/airflow/utils/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/utils/helpers.py b/airflow-core/src/airflow/utils/helpers.py index 73265463edc9b..b9efda28b148c 100644 --- a/airflow-core/src/airflow/utils/helpers.py +++ b/airflow-core/src/airflow/utils/helpers.py @@ -313,6 +313,7 @@ def __getattr__(name: str): except KeyError: raise AttributeError(f"module '{__name__}' has no attribute '{name}'") from None + import importlib import warnings warnings.warn( @@ -320,4 +321,4 @@ def __getattr__(name: str): DeprecationWarning, stacklevel=2, ) - return getattr(__import__(modpath), name) + return getattr(importlib.import_module(modpath), name)