This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch backport-7438cbf-v3-2-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 0427b35802f476dce4954d086ed96d7e0cd28941 Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Mar 31 01:41:49 2026 +0200 [v3-2-test] Fix SecretCache import failure on Python 3.14 multiprocessing (#64501) The `conf` object in `airflow.sdk.configuration` is lazily initialized via `__getattr__`. Importing it at module level in `cache.py` causes `ImportError` when the module is deserialized in a multiprocessing child process on Python 3.14. Moving the import into `SecretCache.init()` where it's actually used avoids this issue. (cherry picked from commit 7438cbfd4b26f560a06a3b86ee599547267e2cd3) Co-authored-by: Jarek Potiuk <[email protected]> --- task-sdk/src/airflow/sdk/execution_time/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/task-sdk/src/airflow/sdk/execution_time/cache.py b/task-sdk/src/airflow/sdk/execution_time/cache.py index 7119b4c590d..f3a05936859 100644 --- a/task-sdk/src/airflow/sdk/execution_time/cache.py +++ b/task-sdk/src/airflow/sdk/execution_time/cache.py @@ -21,7 +21,6 @@ import datetime import multiprocessing from airflow.sdk import timezone -from airflow.sdk.configuration import conf class SecretCache: @@ -55,6 +54,8 @@ class SecretCache: """ if cls._cache is not None: return + from airflow.sdk.configuration import conf + use_cache = conf.getboolean(section="secrets", key="use_cache", fallback=False) if not use_cache: return
