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 1dafcff7ae5 Fix serde recursion limit test by using correct
MAX_RECURSION_DEPTH (#61182)
1dafcff7ae5 is described below
commit 1dafcff7ae52bc87e1d66db93314890dd0ce4f10
Author: Eason09053360 <[email protected]>
AuthorDate: Tue Feb 24 13:58:56 2026 +0800
Fix serde recursion limit test by using correct MAX_RECURSION_DEPTH (#61182)
---
task-sdk/tests/task_sdk/serde/test_serializers.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/task-sdk/tests/task_sdk/serde/test_serializers.py
b/task-sdk/tests/task_sdk/serde/test_serializers.py
index 5cf987d81f3..7935ee2e4c6 100644
--- a/task-sdk/tests/task_sdk/serde/test_serializers.py
+++ b/task-sdk/tests/task_sdk/serde/test_serializers.py
@@ -40,7 +40,7 @@ from pydantic.dataclasses import dataclass as
pydantic_dataclass
from airflow.sdk._shared.module_loading import qualname
from airflow.sdk.definitions.param import Param, ParamsDict
-from airflow.sdk.serde import CLASSNAME, DATA, VERSION, decode, deserialize,
serialize
+from airflow.sdk.serde import CLASSNAME, DATA, MAX_RECURSION_DEPTH, VERSION,
decode, deserialize, serialize
from airflow.sdk.serde.serializers import builtin
from tests_common.test_utils.config import conf_vars
@@ -680,3 +680,8 @@ class TestSerializers:
deserialized = deserialize(serialized)
assert isinstance(deserialized, uuid.UUID)
assert uuid_value == deserialized
+
+ def test_serde_serialize_recursion_limit(self):
+ depth = MAX_RECURSION_DEPTH
+ with pytest.raises(RecursionError, match="maximum recursion depth
reached for serialization"):
+ serialize(object(), depth=depth)