cadwyn 3.6.0__py3-none-any.whl → 3.6.1__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/applications.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from collections.abc import Callable, Coroutine, Sequence
2
- from typing import TYPE_CHECKING, Any
2
+ from types import ModuleType
3
+ from typing import TYPE_CHECKING, Any, cast
3
4
 
4
5
  from fastapi import APIRouter, routing
5
6
  from fastapi.datastructures import Default
@@ -17,9 +18,6 @@ from cadwyn.exceptions import CadwynError
17
18
  from cadwyn.routing import generate_versioned_routers
18
19
  from cadwyn.structure import VersionBundle
19
20
 
20
- if TYPE_CHECKING:
21
- from types import ModuleType
22
-
23
21
 
24
22
  class Cadwyn(HeaderRoutingFastAPI):
25
23
  def __init__(
@@ -65,14 +63,10 @@ class Cadwyn(HeaderRoutingFastAPI):
65
63
  **extra: Any,
66
64
  ) -> None:
67
65
  # TODO: Remove argument entirely in any major version.
68
- self.versions = versions
69
66
  latest_schemas_package = extra.pop("latest_schemas_package", None) or self.versions.latest_schemas_package
70
- if latest_schemas_package is None:
71
- raise CadwynError(
72
- "VersionBundle.latest_schemas_package is None but is required for Cadwyn's correct functioning."
73
- )
74
- self.latest_schemas_package: ModuleType = latest_schemas_package
67
+ self.latest_schemas_package = cast(ModuleType, latest_schemas_package)
75
68
  self.versions.latest_schemas_package = latest_schemas_package
69
+ self.versions = versions
76
70
 
77
71
  super().__init__(
78
72
  api_version_header_name=api_version_header_name,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cadwyn
3
- Version: 3.6.0
3
+ Version: 3.6.1
4
4
  Summary: Production-ready community-driven modern Stripe-like API versioning in FastAPI
5
5
  Home-page: https://github.com/zmievsa/cadwyn
6
6
  License: MIT
@@ -4,7 +4,7 @@ cadwyn/_asts.py,sha256=jFdnbkDDu_10YhJemDUVMut_XoqwIvGMtCQpDeitCiM,10206
4
4
  cadwyn/_compat.py,sha256=6QwtzbXn53mIhEFfEizmFjd-f894oLsM6ITxqq2rCpc,5408
5
5
  cadwyn/_package_utils.py,sha256=trxTYLmppv-10SKhScfyDQJh21rsQGFoLaOtHycKKR0,1443
6
6
  cadwyn/_utils.py,sha256=nBBE9PGo9MuHlCgbX8JPz9XcQxF7zIbVtKaBEsgfhGc,4861
7
- cadwyn/applications.py,sha256=sFx3d7fOx7wGCcLIcF5IoY_QbPX0SooYYzvb4iWtpWg,5397
7
+ cadwyn/applications.py,sha256=-QmOBejDYnwuRiZFuZbRoeIJ0fE_8D9AnUMk2PeAHrA,5185
8
8
  cadwyn/codegen/README.md,sha256=V2Kz2IOz1cTxrC-RnQ7YbWEVCIGYr3tR4IPCvepeq0M,1047
9
9
  cadwyn/codegen/__init__.py,sha256=JgddDjxMTjSfVrMXHwNu1ODgdn2QfPWpccrRKquBV6k,355
10
10
  cadwyn/codegen/_common.py,sha256=j-K0zMINmOKPhwsKjtfmrUrNzgEU4gM2EEFC7wvpCdU,5696
@@ -28,8 +28,8 @@ cadwyn/structure/enums.py,sha256=iMokxA2QYJ61SzyB-Pmuq3y7KL7-e6TsnjLVUaVZQnw,954
28
28
  cadwyn/structure/modules.py,sha256=1FK-lLm-zOTXEvn-QtyBH38aDRht5PDQiZrOPCsBlM4,1268
29
29
  cadwyn/structure/schemas.py,sha256=5hExJEdvEFPK4Cv8G_Gh6E6ltiNMyId_UjGIJz3jz0o,8802
30
30
  cadwyn/structure/versions.py,sha256=6M_saZPlzEQ0LNRQywhtrw-YPdjT0P18EEPTRg1dR8Y,32785
31
- cadwyn-3.6.0.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
32
- cadwyn-3.6.0.dist-info/METADATA,sha256=Z3Y3MtpC_AnXyqeU6lfkfzuye8_di4uiGuUPBrzNjBg,4115
33
- cadwyn-3.6.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
34
- cadwyn-3.6.0.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
35
- cadwyn-3.6.0.dist-info/RECORD,,
31
+ cadwyn-3.6.1.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
32
+ cadwyn-3.6.1.dist-info/METADATA,sha256=DoAIPVvJTgh-572j5LPWqhxOc7Uz2TIzv6k2UjX2G50,4115
33
+ cadwyn-3.6.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
34
+ cadwyn-3.6.1.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
35
+ cadwyn-3.6.1.dist-info/RECORD,,
File without changes