fastapi 0.118.0__py3-none-any.whl → 0.118.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fastapi might be problematic. Click here for more details.
- fastapi/__init__.py +1 -1
- fastapi/_compat.py +18 -3
- fastapi/params.py +8 -8
- {fastapi-0.118.0.dist-info → fastapi-0.118.2.dist-info}/METADATA +1 -1
- {fastapi-0.118.0.dist-info → fastapi-0.118.2.dist-info}/RECORD +8 -8
- {fastapi-0.118.0.dist-info → fastapi-0.118.2.dist-info}/WHEEL +0 -0
- {fastapi-0.118.0.dist-info → fastapi-0.118.2.dist-info}/entry_points.txt +0 -0
- {fastapi-0.118.0.dist-info → fastapi-0.118.2.dist-info}/licenses/LICENSE +0 -0
fastapi/__init__.py
CHANGED
fastapi/_compat.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from collections import deque
|
|
2
3
|
from copy import copy
|
|
3
4
|
from dataclasses import dataclass, is_dataclass
|
|
@@ -109,9 +110,20 @@ if PYDANTIC_V2:
|
|
|
109
110
|
return self.field_info.annotation
|
|
110
111
|
|
|
111
112
|
def __post_init__(self) -> None:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
with warnings.catch_warnings():
|
|
114
|
+
# Pydantic >= 2.12.0 warns about field specific metadata that is unused
|
|
115
|
+
# (e.g. `TypeAdapter(Annotated[int, Field(alias='b')])`). In some cases, we
|
|
116
|
+
# end up building the type adapter from a model field annotation so we
|
|
117
|
+
# need to ignore the warning:
|
|
118
|
+
if PYDANTIC_VERSION_MINOR_TUPLE >= (2, 12):
|
|
119
|
+
from pydantic.warnings import UnsupportedFieldAttributeWarning
|
|
120
|
+
|
|
121
|
+
warnings.simplefilter(
|
|
122
|
+
"ignore", category=UnsupportedFieldAttributeWarning
|
|
123
|
+
)
|
|
124
|
+
self._type_adapter: TypeAdapter[Any] = TypeAdapter(
|
|
125
|
+
Annotated[self.field_info.annotation, self.field_info]
|
|
126
|
+
)
|
|
115
127
|
|
|
116
128
|
def get_default(self) -> Any:
|
|
117
129
|
if self.field_info.is_required():
|
|
@@ -578,6 +590,9 @@ def field_annotation_is_complex(annotation: Union[Type[Any], None]) -> bool:
|
|
|
578
590
|
if origin is Union or origin is UnionType:
|
|
579
591
|
return any(field_annotation_is_complex(arg) for arg in get_args(annotation))
|
|
580
592
|
|
|
593
|
+
if origin is Annotated:
|
|
594
|
+
return field_annotation_is_complex(get_args(annotation)[0])
|
|
595
|
+
|
|
581
596
|
return (
|
|
582
597
|
_annotation_is_complex(annotation)
|
|
583
598
|
or _annotation_is_complex(origin)
|
fastapi/params.py
CHANGED
|
@@ -22,7 +22,7 @@ class ParamTypes(Enum):
|
|
|
22
22
|
cookie = "cookie"
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
class Param(FieldInfo):
|
|
25
|
+
class Param(FieldInfo): # type: ignore[misc]
|
|
26
26
|
in_: ParamTypes
|
|
27
27
|
|
|
28
28
|
def __init__(
|
|
@@ -136,7 +136,7 @@ class Param(FieldInfo):
|
|
|
136
136
|
return f"{self.__class__.__name__}({self.default})"
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
class Path(Param):
|
|
139
|
+
class Path(Param): # type: ignore[misc]
|
|
140
140
|
in_ = ParamTypes.path
|
|
141
141
|
|
|
142
142
|
def __init__(
|
|
@@ -222,7 +222,7 @@ class Path(Param):
|
|
|
222
222
|
)
|
|
223
223
|
|
|
224
224
|
|
|
225
|
-
class Query(Param):
|
|
225
|
+
class Query(Param): # type: ignore[misc]
|
|
226
226
|
in_ = ParamTypes.query
|
|
227
227
|
|
|
228
228
|
def __init__(
|
|
@@ -306,7 +306,7 @@ class Query(Param):
|
|
|
306
306
|
)
|
|
307
307
|
|
|
308
308
|
|
|
309
|
-
class Header(Param):
|
|
309
|
+
class Header(Param): # type: ignore[misc]
|
|
310
310
|
in_ = ParamTypes.header
|
|
311
311
|
|
|
312
312
|
def __init__(
|
|
@@ -392,7 +392,7 @@ class Header(Param):
|
|
|
392
392
|
)
|
|
393
393
|
|
|
394
394
|
|
|
395
|
-
class Cookie(Param):
|
|
395
|
+
class Cookie(Param): # type: ignore[misc]
|
|
396
396
|
in_ = ParamTypes.cookie
|
|
397
397
|
|
|
398
398
|
def __init__(
|
|
@@ -476,7 +476,7 @@ class Cookie(Param):
|
|
|
476
476
|
)
|
|
477
477
|
|
|
478
478
|
|
|
479
|
-
class Body(FieldInfo):
|
|
479
|
+
class Body(FieldInfo): # type: ignore[misc]
|
|
480
480
|
def __init__(
|
|
481
481
|
self,
|
|
482
482
|
default: Any = Undefined,
|
|
@@ -593,7 +593,7 @@ class Body(FieldInfo):
|
|
|
593
593
|
return f"{self.__class__.__name__}({self.default})"
|
|
594
594
|
|
|
595
595
|
|
|
596
|
-
class Form(Body):
|
|
596
|
+
class Form(Body): # type: ignore[misc]
|
|
597
597
|
def __init__(
|
|
598
598
|
self,
|
|
599
599
|
default: Any = Undefined,
|
|
@@ -677,7 +677,7 @@ class Form(Body):
|
|
|
677
677
|
)
|
|
678
678
|
|
|
679
679
|
|
|
680
|
-
class File(Form):
|
|
680
|
+
class File(Form): # type: ignore[misc]
|
|
681
681
|
def __init__(
|
|
682
682
|
self,
|
|
683
683
|
default: Any = Undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi
|
|
3
|
-
Version: 0.118.
|
|
3
|
+
Version: 0.118.2
|
|
4
4
|
Summary: FastAPI framework, high performance, easy to learn, fast to code, ready for production
|
|
5
5
|
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
|
|
6
6
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
fastapi-0.118.
|
|
2
|
-
fastapi-0.118.
|
|
3
|
-
fastapi-0.118.
|
|
4
|
-
fastapi-0.118.
|
|
5
|
-
fastapi/__init__.py,sha256=
|
|
1
|
+
fastapi-0.118.2.dist-info/METADATA,sha256=yrkrXAQmgRf8K6sPfw5HCFzK8cTuCYbqOMTPdbYiaDU,28135
|
|
2
|
+
fastapi-0.118.2.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
fastapi-0.118.2.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
|
|
4
|
+
fastapi-0.118.2.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
|
|
5
|
+
fastapi/__init__.py,sha256=r514dIK-FjZ0GBeqdtq5TSIaheEY4WiYLBgSb6noK8o,1081
|
|
6
6
|
fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
|
|
7
|
-
fastapi/_compat.py,sha256=
|
|
7
|
+
fastapi/_compat.py,sha256=gK1ZeDQYNr6gBYY0Hefr2HZiEawOCuDqm021uU1xOTs,25041
|
|
8
8
|
fastapi/applications.py,sha256=nLbGcVdmCxXsl4aTSuP0WVS_XGY7wXBL3vC7nqlplmA,180276
|
|
9
9
|
fastapi/background.py,sha256=rouLirxUANrcYC824MSMypXL_Qb2HYg2YZqaiEqbEKI,1768
|
|
10
10
|
fastapi/cli.py,sha256=OYhZb0NR_deuT5ofyPF2NoNBzZDNOP8Salef2nk-HqA,418
|
|
@@ -30,7 +30,7 @@ fastapi/openapi/docs.py,sha256=zSDv4xY6XHcKsaG4zyk1HqSnrZtfZFBB0J7ZBk5YHPE,10345
|
|
|
30
30
|
fastapi/openapi/models.py,sha256=m1BNHxf_RiDTK1uCfMre6XZN5y7krZNA62QEP_2EV9s,15625
|
|
31
31
|
fastapi/openapi/utils.py,sha256=ZI-nwdT2PtX8kaRPJylZo4LJHjYAcoVGxkd181P75x4,23997
|
|
32
32
|
fastapi/param_functions.py,sha256=JHNPLIYvoAwdnZZavIVsxOat8x23fX_Kl33reh7HKl8,64019
|
|
33
|
-
fastapi/params.py,sha256=
|
|
33
|
+
fastapi/params.py,sha256=SnkGa4nNdmRek6oOELBHcSieRGjYvDPTla3EOl5Zlis,28413
|
|
34
34
|
fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
fastapi/requests.py,sha256=zayepKFcienBllv3snmWI20Gk0oHNVLU4DDhqXBb4LU,142
|
|
36
36
|
fastapi/responses.py,sha256=QNQQlwpKhQoIPZTTWkpc9d_QGeGZ_aVQPaDV3nQ8m7c,1761
|
|
@@ -48,4 +48,4 @@ fastapi/testclient.py,sha256=nBvaAmX66YldReJNZXPOk1sfuo2Q6hs8bOvIaCep6LQ,66
|
|
|
48
48
|
fastapi/types.py,sha256=nFb36sK3DSoqoyo7Miwy3meKK5UdFBgkAgLSzQlUVyI,383
|
|
49
49
|
fastapi/utils.py,sha256=S59stPvKPUJ7MSkke3FaegSyig_4Uwhd32jnLiMF1jE,8032
|
|
50
50
|
fastapi/websockets.py,sha256=419uncYObEKZG0YcrXscfQQYLSWoE10jqxVMetGdR98,222
|
|
51
|
-
fastapi-0.118.
|
|
51
|
+
fastapi-0.118.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|