fastapi 0.114.0__py3-none-any.whl → 0.114.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.114.0"
3
+ __version__ = "0.114.1"
4
4
 
5
5
  from starlette import status as status
6
6
 
fastapi/_compat.py CHANGED
@@ -2,6 +2,7 @@ from collections import deque
2
2
  from copy import copy
3
3
  from dataclasses import dataclass, is_dataclass
4
4
  from enum import Enum
5
+ from functools import lru_cache
5
6
  from typing import (
6
7
  Any,
7
8
  Callable,
@@ -649,3 +650,8 @@ def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
649
650
  is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
650
651
  for sub_annotation in get_args(annotation)
651
652
  )
653
+
654
+
655
+ @lru_cache
656
+ def get_cached_model_fields(model: Type[BaseModel]) -> List[ModelField]:
657
+ return get_model_fields(model)
@@ -32,8 +32,8 @@ from fastapi._compat import (
32
32
  evaluate_forwardref,
33
33
  field_annotation_is_scalar,
34
34
  get_annotation_from_field_info,
35
+ get_cached_model_fields,
35
36
  get_missing_field_error,
36
- get_model_fields,
37
37
  is_bytes_field,
38
38
  is_bytes_sequence_field,
39
39
  is_scalar_field,
@@ -810,7 +810,7 @@ async def request_body_to_args(
810
810
  fields_to_extract: List[ModelField] = body_fields
811
811
 
812
812
  if single_not_embedded_field and lenient_issubclass(first_field.type_, BaseModel):
813
- fields_to_extract = get_model_fields(first_field.type_)
813
+ fields_to_extract = get_cached_model_fields(first_field.type_)
814
814
 
815
815
  if isinstance(received_body, FormData):
816
816
  body_to_process = await _extract_form_body(fields_to_extract, received_body)
fastapi/params.py CHANGED
@@ -556,7 +556,7 @@ class Body(FieldInfo):
556
556
  kwargs["examples"] = examples
557
557
  if regex is not None:
558
558
  warnings.warn(
559
- "`regex` has been depreacated, please use `pattern` instead",
559
+ "`regex` has been deprecated, please use `pattern` instead",
560
560
  category=DeprecationWarning,
561
561
  stacklevel=4,
562
562
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi
3
- Version: 0.114.0
3
+ Version: 0.114.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.114.0.dist-info/METADATA,sha256=HhWXWTihr-E9YxckTEGOQpd3PGNf78LT6V9RoAO2dnY,27227
2
- fastapi-0.114.0.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
- fastapi-0.114.0.dist-info/entry_points.txt,sha256=Nn2-rs4A5_lQZko2b9QqCKQx9Irx0agGbxq3QLgjBxQ,46
4
- fastapi-0.114.0.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
- fastapi/__init__.py,sha256=3Pm2JqeeZH5lQhMyUMb2_L1LBPXS8QpHzyeF80JB9j0,1081
1
+ fastapi-0.114.1.dist-info/METADATA,sha256=eh0Ve0XsjtSvDWqfoDV2s-8FNdlgswlKk5hH6fJf49w,27227
2
+ fastapi-0.114.1.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
+ fastapi-0.114.1.dist-info/entry_points.txt,sha256=Nn2-rs4A5_lQZko2b9QqCKQx9Irx0agGbxq3QLgjBxQ,46
4
+ fastapi-0.114.1.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
+ fastapi/__init__.py,sha256=EGzN-L7WwY01FOJkqFwOVooW940JC9FdFyXjdT_u5l8,1081
6
6
  fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
7
- fastapi/_compat.py,sha256=9AipVKxefipp4ymECk3VhrryBi-Hbh8A7zsljaWdGAk,23723
7
+ fastapi/_compat.py,sha256=N4y7exHYWpWytEwsDU31YHDXoJRvHxREx2qNS3bF85o,23876
8
8
  fastapi/applications.py,sha256=Ix-o9pQAWhEDf9J0Q1hZ0nBB1uP72c-Y3oiYzvrwqiM,176316
9
9
  fastapi/background.py,sha256=rouLirxUANrcYC824MSMypXL_Qb2HYg2YZqaiEqbEKI,1768
10
10
  fastapi/cli.py,sha256=OYhZb0NR_deuT5ofyPF2NoNBzZDNOP8Salef2nk-HqA,418
@@ -12,7 +12,7 @@ fastapi/concurrency.py,sha256=AYLnS4judDUmXsNRICtoKSP0prfYDcS8ehBtYW9JhQQ,1403
12
12
  fastapi/datastructures.py,sha256=b2PEz77XGq-u3Ur1Inwk0AGjOsQZO49yF9C7IPJ15cY,5766
13
13
  fastapi/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  fastapi/dependencies/models.py,sha256=Pjl6vx-4nZ5Tta9kJa3-RfQKkXtCpS09-FhMgs9eWNs,1507
15
- fastapi/dependencies/utils.py,sha256=Vt_PpaFPoRSFUFRwrymEtLP08gAjiVAcW6R4Fn8gcSo,32459
15
+ fastapi/dependencies/utils.py,sha256=YcgB0ckCkZT5U1U5DP0A1P44heNzyYVE-IRXqx1cmVs,32473
16
16
  fastapi/encoders.py,sha256=LvwYmFeOz4tVwvgBoC5rvZnbr7hZr73KGrU8O7zSptU,11068
17
17
  fastapi/exception_handlers.py,sha256=MBrIOA-ugjJDivIi4rSsUJBdTsjuzN76q4yh0q1COKw,1332
18
18
  fastapi/exceptions.py,sha256=taNixuFEXb67lI1bnX1ubq8y8TseJ4yoPlWjyP0fTzk,4969
@@ -29,7 +29,7 @@ fastapi/openapi/docs.py,sha256=XcQq-ZbQdC5sI0gIGu5MoHK1q-OFaqws7-ORTo6sjY4,10348
29
29
  fastapi/openapi/models.py,sha256=PqkxQiqcEgjKuhfUIWPZPQcyTcubtUCB3vcObLsB7VE,15397
30
30
  fastapi/openapi/utils.py,sha256=asSbOKDuagDfpByNQvPy7OM0sqOBdUmqh64BH-n-5f0,22286
31
31
  fastapi/param_functions.py,sha256=uQzNlihlhM80u4Xbstz__D3L3yxpTqLmsC-Hra1WfqE,64018
32
- fastapi/params.py,sha256=e_ZHoUohqWWbquiBL5AHqdsKJmTMLZzAPii6eCYR3tk,28187
32
+ fastapi/params.py,sha256=XC025dCSObp7fXhOPYo-jwXQRGZ9CwlfNRq2cLh_dRk,28186
33
33
  fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  fastapi/requests.py,sha256=zayepKFcienBllv3snmWI20Gk0oHNVLU4DDhqXBb4LU,142
35
35
  fastapi/responses.py,sha256=QNQQlwpKhQoIPZTTWkpc9d_QGeGZ_aVQPaDV3nQ8m7c,1761
@@ -47,4 +47,4 @@ fastapi/testclient.py,sha256=nBvaAmX66YldReJNZXPOk1sfuo2Q6hs8bOvIaCep6LQ,66
47
47
  fastapi/types.py,sha256=nFb36sK3DSoqoyo7Miwy3meKK5UdFBgkAgLSzQlUVyI,383
48
48
  fastapi/utils.py,sha256=y8Bj5ttMaI9tS4D60OUgXqKnktBr99NdYUnHHV9LgoY,7948
49
49
  fastapi/websockets.py,sha256=419uncYObEKZG0YcrXscfQQYLSWoE10jqxVMetGdR98,222
50
- fastapi-0.114.0.dist-info/RECORD,,
50
+ fastapi-0.114.1.dist-info/RECORD,,