cadwyn 2.3.4__py3-none-any.whl → 2.3.5__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 cadwyn might be problematic. Click here for more details.

@@ -447,9 +447,16 @@ class VersionBundle:
447
447
  method,
448
448
  )
449
449
  if isinstance(response_or_response_body, FastapiResponse):
450
- # TODO: Give user the ability to specify their own renderer
451
- # TODO: Only do this if there are migrations
452
- response_info._response.body = json.dumps(response_info.body).encode()
450
+ # a webserver (uvicorn for instance) calculates the body at the endpoint level.
451
+ # if an endpoint returns no "body", its content-length will be set to 0
452
+ # json.dums(None) results into "null", and content-length should be 4,
453
+ # but it was already calculated to 0 which causes
454
+ # `RuntimeError: Response content longer than Content-Length` or
455
+ # `Too much data for declared Content-Length`, based on the protocol
456
+ if response_info.body is not None:
457
+ # TODO: Give user the ability to specify their own renderer
458
+ # TODO: Only do this if there are migrations
459
+ response_info._response.body = json.dumps(response_info.body).encode()
453
460
  return response_info._response
454
461
  return response_info.body
455
462
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cadwyn
3
- Version: 2.3.4
3
+ Version: 2.3.5
4
4
  Summary: Modern Stripe-like API versioning in FastAPI
5
5
  Home-page: https://github.com/zmievsa/cadwyn
6
6
  License: MIT
@@ -12,9 +12,9 @@ cadwyn/structure/data.py,sha256=kzm3uf7VktH8nwShUk2hdfuuz0uYt9jzkRKMbWy0NtU,6564
12
12
  cadwyn/structure/endpoints.py,sha256=VngfAydGBwekhV2tBOtNDPVgl3X1IgYxUCw--VZ5cQY,5627
13
13
  cadwyn/structure/enums.py,sha256=iMokxA2QYJ61SzyB-Pmuq3y7KL7-e6TsnjLVUaVZQnw,954
14
14
  cadwyn/structure/schemas.py,sha256=wpGFXzoq6qrOulEk7I_69UslapG5iD5crFLQp-kXEFQ,5241
15
- cadwyn/structure/versions.py,sha256=m4kexiDIfLbeoYWcMyxpvMYwa9f08_hBLgG2-DvHsE8,24593
16
- cadwyn-2.3.4.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
17
- cadwyn-2.3.4.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
18
- cadwyn-2.3.4.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
19
- cadwyn-2.3.4.dist-info/METADATA,sha256=AWE5ix_08sKcwC3cdAoOCG5tBzvtTgPgORt9-3riyjk,3845
20
- cadwyn-2.3.4.dist-info/RECORD,,
15
+ cadwyn/structure/versions.py,sha256=DoZO7oKvq1Nh7fx5TqHq03nVM94_lFqTSmR9tAHGzMU,25131
16
+ cadwyn-2.3.5.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
17
+ cadwyn-2.3.5.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
18
+ cadwyn-2.3.5.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
19
+ cadwyn-2.3.5.dist-info/METADATA,sha256=oeNYM4vBcERsogBmLxgukRd9uWDLskWyvOekBcrkK9Y,3845
20
+ cadwyn-2.3.5.dist-info/RECORD,,
File without changes