From 31d48cf3b7b5655b2013ab165ec5b9a6a396bdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 21 Feb 2026 13:07:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Add=20TODO=20comment=20with=20re?= =?UTF-8?q?ference=20to=20Pydantic=20counterpart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/_compat/v2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi/_compat/v2.py b/fastapi/_compat/v2.py index 3936cd248c..0535c806f2 100644 --- a/fastapi/_compat/v2.py +++ b/fastapi/_compat/v2.py @@ -42,6 +42,8 @@ evaluate_forwardref = eval_type_lenient class GenerateJsonSchema(_GenerateJsonSchema): + # TODO: remove when this is merged (or equivalent): https://github.com/pydantic/pydantic/pull/12841 + # and dropping support for any version of Pydantic before that one (so, in a very long time) def bytes_schema(self, schema: CoreSchema) -> JsonSchemaValue: json_schema = {"type": "string", "contentMediaType": "application/octet-stream"} bytes_mode = (