From a936df9f9c9fcfa91f3e0d628d9839bb1d01e343 Mon Sep 17 00:00:00 2001 From: Pastukhov Nikita Date: Sun, 26 May 2024 00:43:10 +0300 Subject: [PATCH] fix: fix 4.12.0 typing extensions error with pydantic (#93) --- fast_depends/__about__.py | 2 +- fast_depends/core/build.py | 2 +- fast_depends/core/model.py | 3 ++- fast_depends/use.py | 3 ++- fast_depends/utils.py | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fast_depends/__about__.py b/fast_depends/__about__.py index 513e73f..fb2ab61 100644 --- a/fast_depends/__about__.py +++ b/fast_depends/__about__.py @@ -1,3 +1,3 @@ """FastDepends - extracted and cleared from HTTP domain FastAPI Dependency Injection System""" -__version__ = "2.4.2" +__version__ = "2.4.3" diff --git a/fast_depends/core/build.py b/fast_depends/core/build.py index 8006eb9..0f86602 100644 --- a/fast_depends/core/build.py +++ b/fast_depends/core/build.py @@ -9,13 +9,13 @@ Sequence, Tuple, Type, + TypeVar, Union, ) from typing_extensions import ( Annotated, ParamSpec, - TypeVar, get_args, get_origin, ) diff --git a/fast_depends/core/model.py b/fast_depends/core/model.py index 2e9d41f..5ae4e65 100644 --- a/fast_depends/core/model.py +++ b/fast_depends/core/model.py @@ -16,11 +16,12 @@ Sequence, Tuple, Type, + TypeVar, Union, ) import anyio -from typing_extensions import ParamSpec, TypeVar +from typing_extensions import ParamSpec from fast_depends._compat import BaseModel, ExceptionGroup, get_aliases from fast_depends.library import CustomField diff --git a/fast_depends/use.py b/fast_depends/use.py index d30728f..52e71c3 100644 --- a/fast_depends/use.py +++ b/fast_depends/use.py @@ -7,12 +7,13 @@ Iterator, Optional, Sequence, + TypeVar, Union, cast, overload, ) -from typing_extensions import ParamSpec, Protocol, TypeVar +from typing_extensions import ParamSpec, Protocol from fast_depends._compat import ConfigDict from fast_depends.core import CallModel, build_call_model diff --git a/fast_depends/utils.py b/fast_depends/utils.py index 2d19e89..7ae51d4 100644 --- a/fast_depends/utils.py +++ b/fast_depends/utils.py @@ -14,6 +14,7 @@ ForwardRef, List, Tuple, + TypeVar, Union, cast, ) @@ -22,7 +23,6 @@ from typing_extensions import ( Annotated, ParamSpec, - TypeVar, get_args, get_origin, )