fastapi 0.115.2__py3-none-any.whl → 0.115.4__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/dependencies/utils.py +19 -11
- fastapi/param_functions.py +1 -1
- fastapi/security/oauth2.py +2 -2
- {fastapi-0.115.2.dist-info → fastapi-0.115.4.dist-info}/METADATA +3 -3
- {fastapi-0.115.2.dist-info → fastapi-0.115.4.dist-info}/RECORD +9 -9
- {fastapi-0.115.2.dist-info → fastapi-0.115.4.dist-info}/WHEEL +1 -1
- {fastapi-0.115.2.dist-info → fastapi-0.115.4.dist-info}/entry_points.txt +0 -0
- {fastapi-0.115.2.dist-info → fastapi-0.115.4.dist-info}/licenses/LICENSE +0 -0
fastapi/__init__.py
CHANGED
fastapi/dependencies/utils.py
CHANGED
|
@@ -90,21 +90,29 @@ multipart_incorrect_install_error = (
|
|
|
90
90
|
|
|
91
91
|
def ensure_multipart_is_installed() -> None:
|
|
92
92
|
try:
|
|
93
|
-
|
|
94
|
-
from multipart import __version__
|
|
93
|
+
from python_multipart import __version__
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
# Import an attribute that can be mocked/deleted in testing
|
|
96
|
+
assert __version__ > "0.0.12"
|
|
97
|
+
except (ImportError, AssertionError):
|
|
97
98
|
try:
|
|
98
|
-
#
|
|
99
|
-
from multipart
|
|
99
|
+
# __version__ is available in both multiparts, and can be mocked
|
|
100
|
+
from multipart import __version__ # type: ignore[no-redef,import-untyped]
|
|
100
101
|
|
|
101
|
-
assert
|
|
102
|
+
assert __version__
|
|
103
|
+
try:
|
|
104
|
+
# parse_options_header is only available in the right multipart
|
|
105
|
+
from multipart.multipart import ( # type: ignore[import-untyped]
|
|
106
|
+
parse_options_header,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
assert parse_options_header
|
|
110
|
+
except ImportError:
|
|
111
|
+
logger.error(multipart_incorrect_install_error)
|
|
112
|
+
raise RuntimeError(multipart_incorrect_install_error) from None
|
|
102
113
|
except ImportError:
|
|
103
|
-
logger.error(
|
|
104
|
-
raise RuntimeError(
|
|
105
|
-
except ImportError:
|
|
106
|
-
logger.error(multipart_not_installed_error)
|
|
107
|
-
raise RuntimeError(multipart_not_installed_error) from None
|
|
114
|
+
logger.error(multipart_not_installed_error)
|
|
115
|
+
raise RuntimeError(multipart_not_installed_error) from None
|
|
108
116
|
|
|
109
117
|
|
|
110
118
|
def get_param_sub_dependant(
|
fastapi/param_functions.py
CHANGED
|
@@ -2298,7 +2298,7 @@ def Security( # noqa: N802
|
|
|
2298
2298
|
dependency.
|
|
2299
2299
|
|
|
2300
2300
|
The term "scope" comes from the OAuth2 specification, it seems to be
|
|
2301
|
-
|
|
2301
|
+
intentionally vague and interpretable. It normally refers to permissions,
|
|
2302
2302
|
in cases to roles.
|
|
2303
2303
|
|
|
2304
2304
|
These scopes are integrated with OpenAPI (and the API docs at `/docs`).
|
fastapi/security/oauth2.py
CHANGED
|
@@ -52,7 +52,7 @@ class OAuth2PasswordRequestForm:
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
|
|
55
|
-
You could have custom internal logic to separate it by colon
|
|
55
|
+
You could have custom internal logic to separate it by colon characters (`:`) or
|
|
56
56
|
similar, and get the two parts `items` and `read`. Many applications do that to
|
|
57
57
|
group and organize permissions, you could do it as well in your application, just
|
|
58
58
|
know that that it is application specific, it's not part of the specification.
|
|
@@ -194,7 +194,7 @@ class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm):
|
|
|
194
194
|
```
|
|
195
195
|
|
|
196
196
|
Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
|
|
197
|
-
You could have custom internal logic to separate it by colon
|
|
197
|
+
You could have custom internal logic to separate it by colon characters (`:`) or
|
|
198
198
|
similar, and get the two parts `items` and `read`. Many applications do that to
|
|
199
199
|
group and organize permissions, you could do it as well in your application, just
|
|
200
200
|
know that that it is application specific, it's not part of the specification.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi
|
|
3
|
-
Version: 0.115.
|
|
3
|
+
Version: 0.115.4
|
|
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
|
|
@@ -36,7 +36,7 @@ Project-URL: Repository, https://github.com/fastapi/fastapi
|
|
|
36
36
|
Project-URL: Issues, https://github.com/fastapi/fastapi/issues
|
|
37
37
|
Project-URL: Changelog, https://fastapi.tiangolo.com/release-notes/
|
|
38
38
|
Requires-Python: >=3.8
|
|
39
|
-
Requires-Dist: starlette<0.
|
|
39
|
+
Requires-Dist: starlette<0.42.0,>=0.40.0
|
|
40
40
|
Requires-Dist: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4
|
|
41
41
|
Requires-Dist: typing-extensions>=4.8.0
|
|
42
42
|
Provides-Extra: standard
|
|
@@ -158,7 +158,7 @@ The key features are:
|
|
|
158
158
|
|
|
159
159
|
"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
|
|
160
160
|
|
|
161
|
-
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://
|
|
161
|
+
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://github.com/hugapi/hug" target="_blank">Hug</a> creator</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
|
|
162
162
|
|
|
163
163
|
---
|
|
164
164
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fastapi-0.115.
|
|
2
|
-
fastapi-0.115.
|
|
3
|
-
fastapi-0.115.
|
|
4
|
-
fastapi-0.115.
|
|
5
|
-
fastapi/__init__.py,sha256=
|
|
1
|
+
fastapi-0.115.4.dist-info/METADATA,sha256=KnoTAPMMRkephxMjztN6CFY45zbwppVFbYfmPiDslFk,27012
|
|
2
|
+
fastapi-0.115.4.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
3
|
+
fastapi-0.115.4.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
|
|
4
|
+
fastapi-0.115.4.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
|
|
5
|
+
fastapi/__init__.py,sha256=ONhijU-6VwSQHPiCIf4ysFcBLvxRaCDICA0ZyakjVuA,1081
|
|
6
6
|
fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
|
|
7
7
|
fastapi/_compat.py,sha256=GJTevkAENKrvtvAGL3zDEmzlXaX9EjFzyRPtSfVRCKs,23921
|
|
8
8
|
fastapi/applications.py,sha256=Ix-o9pQAWhEDf9J0Q1hZ0nBB1uP72c-Y3oiYzvrwqiM,176316
|
|
@@ -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=
|
|
15
|
+
fastapi/dependencies/utils.py,sha256=UqN1H0k_4PCnP-nRYNpup1fdIuzEx1F5ZVO6WuVRx4E,35579
|
|
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
|
|
@@ -28,7 +28,7 @@ fastapi/openapi/constants.py,sha256=adGzmis1L1HJRTE3kJ5fmHS_Noq6tIY6pWv_SFzoFDU,
|
|
|
28
28
|
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=vpbAzWpuNaJL_ocBxt4jp0GUUwrDKNB1anyoAx69fhA,23177
|
|
31
|
-
fastapi/param_functions.py,sha256=
|
|
31
|
+
fastapi/param_functions.py,sha256=JHNPLIYvoAwdnZZavIVsxOat8x23fX_Kl33reh7HKl8,64019
|
|
32
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
|
|
@@ -38,7 +38,7 @@ fastapi/security/__init__.py,sha256=bO8pNmxqVRXUjfl2mOKiVZLn0FpBQ61VUYVjmppnbJw,
|
|
|
38
38
|
fastapi/security/api_key.py,sha256=_OqUUjEHG5_MT1IPAhXIGJRCPldTBdSww_DegFy_W8Y,9368
|
|
39
39
|
fastapi/security/base.py,sha256=dl4pvbC-RxjfbWgPtCWd8MVU-7CB2SZ22rJDXVCXO6c,141
|
|
40
40
|
fastapi/security/http.py,sha256=223bAV_d7NjI57Pzhbd_KlQTYlMyr5MoN1TW80rbxF8,13512
|
|
41
|
-
fastapi/security/oauth2.py,sha256=
|
|
41
|
+
fastapi/security/oauth2.py,sha256=BbXdQ_W2Pm5NIcpHGBSBa1u3t0EBLCgiYdOLfid1t4A,21585
|
|
42
42
|
fastapi/security/open_id_connect_url.py,sha256=8vizZ2tGqEp1ur8SwtVgyHJhGAJ5AqahgcvSpaIioDI,2722
|
|
43
43
|
fastapi/security/utils.py,sha256=bd8T0YM7UQD5ATKucr1bNtAvz_Y3__dVNAv5UebiPvc,293
|
|
44
44
|
fastapi/staticfiles.py,sha256=iirGIt3sdY2QZXd36ijs3Cj-T0FuGFda3cd90kM9Ikw,69
|
|
@@ -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.115.
|
|
50
|
+
fastapi-0.115.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|