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

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


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 0d0b3987edd [v3-1-test] Serialize pydantic models in json mode. This 
ensures the dict is json serializable. (#56736) (#56878) (#56939)
0d0b3987edd is described below

commit 0d0b3987edd1c12a38512991a6fa8d2d989cacba
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Oct 21 16:41:15 2025 +0100

    [v3-1-test] Serialize pydantic models in json mode. This ensures the dict 
is json serializable. (#56736) (#56878) (#56939)
    
    (cherry picked from commit e33598939d9286bbe095f09ce6f0437bacfc91a4)
    
    Co-authored-by: Desdroid <[email protected]>
---
 airflow-core/src/airflow/serialization/serializers/pydantic.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/serialization/serializers/pydantic.py 
b/airflow-core/src/airflow/serialization/serializers/pydantic.py
index 91db3812643..b07cc634176 100644
--- a/airflow-core/src/airflow/serialization/serializers/pydantic.py
+++ b/airflow-core/src/airflow/serialization/serializers/pydantic.py
@@ -46,7 +46,7 @@ def serialize(o: object) -> tuple[U, str, int, bool]:
     if not is_pydantic_model(o):
         return "", "", 0, False
 
-    data = o.model_dump()  # type: ignore
+    data = o.model_dump(mode="json")  # type: ignore
 
     return data, qualname(o), __version__, True
 

Reply via email to