From: mvanderlee <918128+mvanderlee@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:34:01 +0000 (+0100) Subject: 🏷️ Re-export `IncEx` type from Pydantic instead of duplicating it (#14641) X-Git-Tag: 0.128.1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0748214c43d0793b56a309199f45b9bf78c0da26;p=thirdparty%2Ffastapi%2Ffastapi.git 🏷️ Re-export `IncEx` type from Pydantic instead of duplicating it (#14641) --- diff --git a/fastapi/types.py b/fastapi/types.py index d3e980cb4..1c3a6de74 100644 --- a/fastapi/types.py +++ b/fastapi/types.py @@ -3,9 +3,9 @@ from enum import Enum from typing import Any, Callable, Optional, TypeVar, Union from pydantic import BaseModel +from pydantic.main import IncEx as IncEx DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any]) UnionType = getattr(types, "UnionType", Union) ModelNameMap = dict[Union[type[BaseModel], type[Enum]], str] -IncEx = Union[set[int], set[str], dict[int, Any], dict[str, Any]] DependencyCacheKey = tuple[Optional[Callable[..., Any]], tuple[str, ...], str]