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

@@ -1,5 +1,6 @@
1
1
  import email.message
2
2
  import functools
3
+ import http
3
4
  import inspect
4
5
  import json
5
6
  from collections import defaultdict
@@ -8,7 +9,7 @@ from contextlib import AsyncExitStack
8
9
  from contextvars import ContextVar
9
10
  from datetime import date
10
11
  from enum import Enum
11
- from typing import TYPE_CHECKING, ClassVar, Union
12
+ from typing import TYPE_CHECKING, ClassVar, Union, cast
12
13
 
13
14
  from fastapi import BackgroundTasks, HTTPException, params
14
15
  from fastapi import Request as FastapiRequest
@@ -616,12 +617,13 @@ class VersionBundle:
616
617
  detail = response_info.body["detail"]
617
618
  else:
618
619
  detail = response_info.body
620
+ if detail is None:
621
+ detail = http.HTTPStatus(response_info.status_code).phrase
622
+ raised_exception.detail = cast(str, detail)
623
+ raised_exception.headers = dict(response_info.headers)
624
+ raised_exception.status_code = response_info.status_code
619
625
 
620
- raise HTTPException(
621
- status_code=response_info.status_code,
622
- detail=detail,
623
- headers=dict(response_info.headers),
624
- )
626
+ raise raised_exception
625
627
  return response_info._response
626
628
  return response_info.body
627
629
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cadwyn
3
- Version: 5.1.3
3
+ Version: 5.1.4
4
4
  Summary: Production-ready community-driven modern Stripe-like API versioning in FastAPI
5
5
  Project-URL: Source code, https://github.com/zmievsa/cadwyn
6
6
  Project-URL: Documentation, https://docs.cadwyn.dev
@@ -21,9 +21,9 @@ cadwyn/structure/data.py,sha256=NWURVnP_84VI2ugp9ppo0Ofyve3pVYjymF9K82Jh-SA,7791
21
21
  cadwyn/structure/endpoints.py,sha256=zUgzglNhBPnmWdJ03A8pFT4zPs_lj8nQ7c7Uo2d-ejU,6246
22
22
  cadwyn/structure/enums.py,sha256=4FCc9aniLE3VuWAVIacrNP_FWxTIUm9JkeeHA_zZdwQ,1254
23
23
  cadwyn/structure/schemas.py,sha256=80AUbko1cksXh7qPBmnknDFLK52xr4kw9HfHeXqcw1I,10813
24
- cadwyn/structure/versions.py,sha256=PrWA2m-81b7LuYqrmaaEr-LhQ54nXz7sSe_-WKb-9g0,34271
25
- cadwyn-5.1.3.dist-info/METADATA,sha256=0potORxoJReb0o3x-XcCIP1BcASKGUDOJAeW45AggHY,4562
26
- cadwyn-5.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
- cadwyn-5.1.3.dist-info/entry_points.txt,sha256=mGX8wl-Xfhpr5M93SUmkykaqinUaYAvW9rtDSX54gx0,47
28
- cadwyn-5.1.3.dist-info/licenses/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
29
- cadwyn-5.1.3.dist-info/RECORD,,
24
+ cadwyn/structure/versions.py,sha256=eEF5FUrao3bYd-OiZeyG0fkozuThRqhW7sEzRNhdsfQ,34440
25
+ cadwyn-5.1.4.dist-info/METADATA,sha256=dERQ0uTzbqFX717Khya0WEEXeDXWEe7fI6x_O0QS1Zk,4562
26
+ cadwyn-5.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
+ cadwyn-5.1.4.dist-info/entry_points.txt,sha256=mGX8wl-Xfhpr5M93SUmkykaqinUaYAvW9rtDSX54gx0,47
28
+ cadwyn-5.1.4.dist-info/licenses/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
29
+ cadwyn-5.1.4.dist-info/RECORD,,
File without changes