cadwyn 2.3.3__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.
- cadwyn/codegen.py +1 -1
- cadwyn/structure/versions.py +10 -3
- {cadwyn-2.3.3.dist-info → cadwyn-2.3.5.dist-info}/METADATA +1 -1
- {cadwyn-2.3.3.dist-info → cadwyn-2.3.5.dist-info}/RECORD +7 -7
- {cadwyn-2.3.3.dist-info → cadwyn-2.3.5.dist-info}/LICENSE +0 -0
- {cadwyn-2.3.3.dist-info → cadwyn-2.3.5.dist-info}/WHEEL +0 -0
- {cadwyn-2.3.3.dist-info → cadwyn-2.3.5.dist-info}/entry_points.txt +0 -0
cadwyn/codegen.py
CHANGED
|
@@ -246,7 +246,7 @@ class _ModelWrapper:
|
|
|
246
246
|
"but it already has that value.",
|
|
247
247
|
)
|
|
248
248
|
|
|
249
|
-
if
|
|
249
|
+
if hasattr(model_field.annotation, attr_name) and current_field_is_constrained_type:
|
|
250
250
|
setattr(model_field.annotation, attr_name, attr_value)
|
|
251
251
|
ann_ast = model_field_wrapper.annotation_ast
|
|
252
252
|
if ann_ast is not None and isinstance(ann_ast, ast.Call):
|
cadwyn/structure/versions.py
CHANGED
|
@@ -447,9 +447,16 @@ class VersionBundle:
|
|
|
447
447
|
method,
|
|
448
448
|
)
|
|
449
449
|
if isinstance(response_or_response_body, FastapiResponse):
|
|
450
|
-
#
|
|
451
|
-
#
|
|
452
|
-
|
|
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,7 +1,7 @@
|
|
|
1
1
|
cadwyn/__init__.py,sha256=95dxX1XyN-i4pPn1Ji1E5TMnWe6olqm1MYutMiWTtWw,492
|
|
2
2
|
cadwyn/__main__.py,sha256=aKAwxVnhqi3ATd1UsifoLA1t3udTzz56t0BRTlktX1A,2845
|
|
3
3
|
cadwyn/_utils.py,sha256=Uh6No0FNY1AR2Z2E19fMPIU9_J4lbuG8XOQU2AlDIZw,3600
|
|
4
|
-
cadwyn/codegen.py,sha256=
|
|
4
|
+
cadwyn/codegen.py,sha256=mJrBF8R35a1susfxTKfEFUNSjeg6sNlaq3akGjz9JHA,40853
|
|
5
5
|
cadwyn/exceptions.py,sha256=Utb6anOzrh97nOUgqCMmZHkQg8SFafLKSKO0EUPQ0yU,624
|
|
6
6
|
cadwyn/main.py,sha256=ofTKT8LvOkFh5M19UgPNWLxf-3_yVOGNTVPnoADc3Q4,4894
|
|
7
7
|
cadwyn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -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=
|
|
16
|
-
cadwyn-2.3.
|
|
17
|
-
cadwyn-2.3.
|
|
18
|
-
cadwyn-2.3.
|
|
19
|
-
cadwyn-2.3.
|
|
20
|
-
cadwyn-2.3.
|
|
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
|
|
File without changes
|
|
File without changes
|