cadwyn 5.3.1__py3-none-any.whl → 5.3.3__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/schema_generation.py +10 -2
- {cadwyn-5.3.1.dist-info → cadwyn-5.3.3.dist-info}/METADATA +2 -2
- {cadwyn-5.3.1.dist-info → cadwyn-5.3.3.dist-info}/RECORD +6 -6
- {cadwyn-5.3.1.dist-info → cadwyn-5.3.3.dist-info}/WHEEL +0 -0
- {cadwyn-5.3.1.dist-info → cadwyn-5.3.3.dist-info}/entry_points.txt +0 -0
- {cadwyn-5.3.1.dist-info → cadwyn-5.3.3.dist-info}/licenses/LICENSE +0 -0
cadwyn/schema_generation.py
CHANGED
|
@@ -102,6 +102,14 @@ PYDANTIC_DECORATOR_TYPE_TO_DECORATOR_MAP = {
|
|
|
102
102
|
ComputedFieldInfo: pydantic.computed_field,
|
|
103
103
|
}
|
|
104
104
|
_PYDANTIC_ALL_EXPORTED_NAMES = set(pydantic.__all__)
|
|
105
|
+
_DEFAULT_PYDANTIC_CLASSES = (BaseModel, RootModel)
|
|
106
|
+
|
|
107
|
+
try:
|
|
108
|
+
from pydantic_settings import BaseSettings
|
|
109
|
+
|
|
110
|
+
_DEFAULT_PYDANTIC_CLASSES = (*_DEFAULT_PYDANTIC_CLASSES, BaseSettings)
|
|
111
|
+
except ImportError: # pragma: no cover
|
|
112
|
+
pass
|
|
105
113
|
|
|
106
114
|
|
|
107
115
|
VALIDATOR_CONFIG_KEY = "__validators__"
|
|
@@ -506,7 +514,7 @@ class _CallableWrapper:
|
|
|
506
514
|
return hash(self._original_callable)
|
|
507
515
|
|
|
508
516
|
def __eq__(self, value: object) -> bool:
|
|
509
|
-
return self._original_callable == value
|
|
517
|
+
return self._original_callable == value
|
|
510
518
|
|
|
511
519
|
|
|
512
520
|
class _AsyncCallableWrapper(_CallableWrapper):
|
|
@@ -757,7 +765,7 @@ class SchemaGenerator:
|
|
|
757
765
|
if (
|
|
758
766
|
not isinstance(model, type)
|
|
759
767
|
or not lenient_issubclass(model, (BaseModel, Enum))
|
|
760
|
-
or model in
|
|
768
|
+
or model in _DEFAULT_PYDANTIC_CLASSES
|
|
761
769
|
):
|
|
762
770
|
return model
|
|
763
771
|
model = _unwrap_model(model)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cadwyn
|
|
3
|
-
Version: 5.3.
|
|
3
|
+
Version: 5.3.3
|
|
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
|
|
@@ -59,7 +59,7 @@ Production-ready community-driven modern [Stripe-like](https://stripe.com/blog/a
|
|
|
59
59
|
<img src="https://img.shields.io/codecov/c/github/zmievsa/cadwyn?color=%2334D058&logo=codecov" alt="Coverage">
|
|
60
60
|
</a>
|
|
61
61
|
<a href="https://pypi.org/project/cadwyn/" target="_blank">
|
|
62
|
-
<img alt="PyPI" src="https://img.shields.io/pypi/v/cadwyn?color=%2334D058&logo=pypi&label=PyPI
|
|
62
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/cadwyn?color=%2334D058&logo=pypi&label=PyPI" alt="Package version">
|
|
63
63
|
</a>
|
|
64
64
|
<a href="https://pypi.org/project/cadwyn/" target="_blank">
|
|
65
65
|
<img src="https://img.shields.io/pypi/pyversions/cadwyn?color=%2334D058&logo=python" alt="Supported Python versions">
|
|
@@ -12,7 +12,7 @@ cadwyn/middleware.py,sha256=4Ziq1ysnc8j5KmeZpsr9VJKllEFC8uYwXnG01I2FPR4,4853
|
|
|
12
12
|
cadwyn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
cadwyn/route_generation.py,sha256=RTZYfml03oKaNm_-SJX8N6PnafFXdsPpN0qEapHSzTw,27181
|
|
14
14
|
cadwyn/routing.py,sha256=Ii6Qbgm9lGks1IAk-kDuIu_dX3FXsA77KSfGOFmLbgc,7604
|
|
15
|
-
cadwyn/schema_generation.py,sha256=
|
|
15
|
+
cadwyn/schema_generation.py,sha256=Cm_cS724lsfOUog3HUnWUqggzr5V6UE5XgUvfiwJqaA,47014
|
|
16
16
|
cadwyn/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
cadwyn/_internal/context_vars.py,sha256=VcM8eAoSlvrIMFQhjZmjflV5o1yrPSEZZGkwOK4OSf4,378
|
|
18
18
|
cadwyn/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -24,8 +24,8 @@ cadwyn/structure/endpoints.py,sha256=zUgzglNhBPnmWdJ03A8pFT4zPs_lj8nQ7c7Uo2d-ejU
|
|
|
24
24
|
cadwyn/structure/enums.py,sha256=4FCc9aniLE3VuWAVIacrNP_FWxTIUm9JkeeHA_zZdwQ,1254
|
|
25
25
|
cadwyn/structure/schemas.py,sha256=O9yNw1OB0Qz-PvNB0FYlQm34gQsjyG2l9gg9x-RnJIY,10781
|
|
26
26
|
cadwyn/structure/versions.py,sha256=yOZ-x24Rb0itcZvQBe-92x9BiCLZK4cMqo0iX0DVN2k,34708
|
|
27
|
-
cadwyn-5.3.
|
|
28
|
-
cadwyn-5.3.
|
|
29
|
-
cadwyn-5.3.
|
|
30
|
-
cadwyn-5.3.
|
|
31
|
-
cadwyn-5.3.
|
|
27
|
+
cadwyn-5.3.3.dist-info/METADATA,sha256=HPeIny9sf76BAxYuzo91Le8eQg_d6_NLXd4o45bjlVw,4535
|
|
28
|
+
cadwyn-5.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
29
|
+
cadwyn-5.3.3.dist-info/entry_points.txt,sha256=mGX8wl-Xfhpr5M93SUmkykaqinUaYAvW9rtDSX54gx0,47
|
|
30
|
+
cadwyn-5.3.3.dist-info/licenses/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
|
|
31
|
+
cadwyn-5.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|