fastapi 0.118.0__py3-none-any.whl → 0.118.1__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  """FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
2
2
 
3
- __version__ = "0.118.0"
3
+ __version__ = "0.118.1"
4
4
 
5
5
  from starlette import status as status
6
6
 
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
- self._type_adapter: TypeAdapter[Any] = TypeAdapter(
113
- Annotated[self.field_info.annotation, self.field_info]
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():
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.0
3
+ Version: 0.118.1
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.0.dist-info/METADATA,sha256=RU7sXRYZDFARbkSSsO8GPrY7UfY76lmfqw9KZ2vXT6g,28135
2
- fastapi-0.118.0.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- fastapi-0.118.0.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
4
- fastapi-0.118.0.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
- fastapi/__init__.py,sha256=SlrlRcZQncT3o5Yip5GQIOvht2J2uCLN1rY2m_TPfuA,1081
1
+ fastapi-0.118.1.dist-info/METADATA,sha256=1lJR4RMjB0KOujx5btnmcdNbsJTv37qlicYZUphrEQY,28135
2
+ fastapi-0.118.1.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ fastapi-0.118.1.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
4
+ fastapi-0.118.1.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
+ fastapi/__init__.py,sha256=b1Y5tsac-lGeykg5dBEqr560dTxtO-XapvIgZVeg3_o,1081
6
6
  fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
7
- fastapi/_compat.py,sha256=EQyNY-qrN3cjwI1r69JVAROc2lQCvi6W1we6_7jx_gc,24274
7
+ fastapi/_compat.py,sha256=n1chC6BiNuBbXVnvOskZSo_8_VeZ2ESoyaG9gt48W_g,24944
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=g450axUBQgQJODdtM7WBxZbQj9Z64inFvadrgHikBbU,28237
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.0.dist-info/RECORD,,
51
+ fastapi-0.118.1.dist-info/RECORD,,