fastapi 0.120.3__py3-none-any.whl → 0.120.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 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.120.3"
3
+ __version__ = "0.120.4"
4
4
 
5
5
  from starlette import status as status
6
6
 
@@ -248,6 +248,14 @@ def get_dependant(
248
248
  path_param_names = get_path_param_names(path)
249
249
  endpoint_signature = get_typed_signature(call)
250
250
  signature_params = endpoint_signature.parameters
251
+ if isinstance(call, SecurityBase):
252
+ use_scopes: List[str] = []
253
+ if isinstance(call, (OAuth2, OpenIdConnect)):
254
+ use_scopes = security_scopes
255
+ security_requirement = SecurityRequirement(
256
+ security_scheme=call, scopes=use_scopes
257
+ )
258
+ dependant.security_requirements.append(security_requirement)
251
259
  for param_name, param in signature_params.items():
252
260
  is_path_param = param_name in path_param_names
253
261
  param_details = analyze_param(
@@ -269,16 +277,6 @@ def get_dependant(
269
277
  security_scopes=use_security_scopes,
270
278
  use_cache=param_details.depends.use_cache,
271
279
  )
272
- if isinstance(param_details.depends.dependency, SecurityBase):
273
- use_scopes: List[str] = []
274
- if isinstance(
275
- param_details.depends.dependency, (OAuth2, OpenIdConnect)
276
- ):
277
- use_scopes = use_security_scopes
278
- security_requirement = SecurityRequirement(
279
- security_scheme=param_details.depends.dependency, scopes=use_scopes
280
- )
281
- sub_dependant.security_requirements.append(security_requirement)
282
280
  dependant.dependencies.append(sub_dependant)
283
281
  continue
284
282
  if add_non_field_param_to_dependency(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi
3
- Version: 0.120.3
3
+ Version: 0.120.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
  License-Expression: MIT
@@ -1,8 +1,8 @@
1
- fastapi-0.120.3.dist-info/METADATA,sha256=FtKxo8gfHGyTCa8jQV0CjwJlL7gV01Hq_oOO1LV8tgY,28394
2
- fastapi-0.120.3.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- fastapi-0.120.3.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
4
- fastapi-0.120.3.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
- fastapi/__init__.py,sha256=PTCa4i_e9zIhH_lBO383KH1rUF-o6N2J7S81vy5a1Ao,1081
1
+ fastapi-0.120.4.dist-info/METADATA,sha256=od0Sen6zkiBqq9HBk6uidi-DPgYkMjvRwZEGtnADbow,28394
2
+ fastapi-0.120.4.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ fastapi-0.120.4.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
4
+ fastapi-0.120.4.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
5
+ fastapi/__init__.py,sha256=yhL-VDMfthNMaLvbI-QYFGaLgnjBvEOE9r0bXW7HErQ,1081
6
6
  fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
7
7
  fastapi/_compat/__init__.py,sha256=8fa5XmM6_whr6YWuCs7KDdKR_gZ_AMmaxYW7GDn0eng,2718
8
8
  fastapi/_compat/main.py,sha256=WDixlh9_5nfFuwWvbYQJNi8l5nDZdfbl2nMyTriG65c,10978
@@ -18,7 +18,7 @@ fastapi/concurrency.py,sha256=MirfowoSpkMQZ8j_g0ZxaQKpV6eB3G-dB5TgcXCrgEA,1424
18
18
  fastapi/datastructures.py,sha256=VnWKzzE1EW7KLOTRNWeEqlIoJQASCfgdKOOu5EM3H9A,5813
19
19
  fastapi/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  fastapi/dependencies/models.py,sha256=Pjl6vx-4nZ5Tta9kJa3-RfQKkXtCpS09-FhMgs9eWNs,1507
21
- fastapi/dependencies/utils.py,sha256=G-3O-cwfRw5G47in_LkTXwKXmdPHKwQKYlTXYyRY3PA,38298
21
+ fastapi/dependencies/utils.py,sha256=riXXDq8LFiq-AomEYtLa80YP0a7zgPrAEF-DE8iB9yk,38104
22
22
  fastapi/encoders.py,sha256=KAMFJ0sz0FFl0Pg4sUiXiuq94av3mLdLZnzeYp9f4wM,11343
23
23
  fastapi/exception_handlers.py,sha256=YVcT8Zy021VYYeecgdyh5YEUjEIHKcLspbkSf4OfbJI,1275
24
24
  fastapi/exceptions.py,sha256=GuwxWZSXM44SbN3NCZXDfw9g2mNM5XM2FXOWPZkcOI4,4994
@@ -55,4 +55,4 @@ fastapi/testclient.py,sha256=nBvaAmX66YldReJNZXPOk1sfuo2Q6hs8bOvIaCep6LQ,66
55
55
  fastapi/types.py,sha256=nFb36sK3DSoqoyo7Miwy3meKK5UdFBgkAgLSzQlUVyI,383
56
56
  fastapi/utils.py,sha256=Nedm_1OJnL12uHJ85HTPCO-AHfwxCtXObFpBi_0X4xQ,9010
57
57
  fastapi/websockets.py,sha256=419uncYObEKZG0YcrXscfQQYLSWoE10jqxVMetGdR98,222
58
- fastapi-0.120.3.dist-info/RECORD,,
58
+ fastapi-0.120.4.dist-info/RECORD,,