From 04ca7055e5b03f9a0cc8bfdf80a765715f5a7f10 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Wed, 1 Oct 2025 21:25:46 +0200 Subject: [PATCH] Reapply "Match return type of SerializationInfo.mode() to mode of model_dump() (#1770)" (#1797) This reverts commit 25b06492631f289e2689200779088a15e7f0667b. --- python/pydantic_core/core_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pydantic_core/core_schema.py b/python/pydantic_core/core_schema.py index e0870b42c..0ba056555 100644 --- a/python/pydantic_core/core_schema.py +++ b/python/pydantic_core/core_schema.py @@ -145,7 +145,7 @@ def context(self) -> ContextT: ... @property - def mode(self) -> Literal['python', 'json']: + def mode(self) -> Literal['python', 'json'] | str: """The serialization mode set during serialization.""" ...