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

potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-2-test by this push:
     new 11770a5b637 [v3-2-test] Fix SecretCache import error in Python 3.14 
with pytest-xdist (#64525) (#64537)
11770a5b637 is described below

commit 11770a5b637e98589a613223ad9909c4e8a36acc
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Mar 31 17:00:16 2026 +0200

    [v3-2-test] Fix SecretCache import error in Python 3.14 with pytest-xdist 
(#64525) (#64537)
    
    (cherry picked from commit bcf74de0e2d88365258e0ee5fc13c3409388743c)
    
    Co-authored-by: Amogh Desai <[email protected]>
---
 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