From 49492b0efcb2b4c70a8c47ea29059a81683cca01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 8 Oct 2025 19:14:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20types=20for=20Python=203?= =?UTF-8?q?.9=20and=20below?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/utils.py b/fastapi/utils.py index 0d8e16ad8..f8375bc8e 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -79,7 +79,7 @@ def create_model_field( class_validators: Optional[Dict[str, Validator]] = None, default: Optional[Any] = Undefined, required: Union[bool, UndefinedType] = Undefined, - model_config: Type[BaseConfig] | None = None, + model_config: Union[Type[BaseConfig], None] = None, field_info: Optional[FieldInfo] = None, alias: Optional[str] = None, mode: Literal["validation", "serialization"] = "validation",