From 2ac4492bcee5d129d2045bbdf596ec13a669bb04 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:00:38 +0200 Subject: [PATCH] Revert "Match return type of SerializationInfo.mode() to mode of model_dump() (#1770)" This reverts commit d0dbb097ec96e06e4b32fce53acad2013625bc11. See https://github.com/pydantic/pydantic-core/pull/1747#discussion_r2260241567 for more details. --- 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 298b4f3ec..a04427e0c 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'] | str: + def mode(self) -> Literal['python', 'json']: """The serialization mode set during serialization.""" ...