This is an automated email from the ASF dual-hosted git repository.

amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new bcf74de0e2d Fix SecretCache import error in Python 3.14 with 
pytest-xdist (#64525)
bcf74de0e2d is described below

commit bcf74de0e2d88365258e0ee5fc13c3409388743c
Author: Amogh Desai <[email protected]>
AuthorDate: Tue Mar 31 15:51:50 2026 +0530

    Fix SecretCache import error in Python 3.14 with pytest-xdist (#64525)
---
 task-sdk/src/airflow/sdk/execution_time/cache.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/task-sdk/src/airflow/sdk/execution_time/cache.py 
b/task-sdk/src/airflow/sdk/execution_time/cache.py
index f3a05936859..c736bd8e168 100644
--- a/task-sdk/src/airflow/sdk/execution_time/cache.py
+++ b/task-sdk/src/airflow/sdk/execution_time/cache.py
@@ -20,8 +20,6 @@ from __future__ import annotations
 import datetime
 import multiprocessing
 
-from airflow.sdk import timezone
-
 
 class SecretCache:
     """A static class to manage the global secret cache."""
@@ -35,10 +33,14 @@ class SecretCache:
 
     class _CacheValue:
         def __init__(self, value: str | None) -> None:
+            from airflow.sdk import timezone
+
             self.value = value
             self.date = timezone.utcnow()
 
         def is_expired(self, ttl: datetime.timedelta) -> bool:
+            from airflow.sdk import timezone
+
             return timezone.utcnow() - self.date > ttl
 
     _VARIABLE_PREFIX = "__v_"

Reply via email to