serialite 0.3.6__tar.gz → 0.3.7__tar.gz
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.
- serialite-0.3.7/LICENSE +19 -0
- {serialite-0.3.6 → serialite-0.3.7}/PKG-INFO +2 -1
- {serialite-0.3.6 → serialite-0.3.7}/pyproject.toml +3 -2
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_base.py +1 -1
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_decorators.py +1 -1
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_fields_serializer.py +7 -11
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_union.py +1 -1
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_mixins.py +1 -1
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_stable_set.py +1 -1
- {serialite-0.3.6 → serialite-0.3.7}/README.md +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/__init__.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_dataclass.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_descriptors.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_dispatcher.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/__init__.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_array.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_boolean.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_date_time.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_dictionary.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_float.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_integer.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_json.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_list.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_literal.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_none.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_ordered_set.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_path.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_reserved.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_set.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_string.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_tuple.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_implementations/_uuid.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_monkey_patches.py +2 -2
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_numeric_check.py +0 -0
- {serialite-0.3.6 → serialite-0.3.7}/src/serialite/_result.py +1 -1
serialite-0.3.7/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2022-2025 David R Hagen
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: serialite
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Summary: A serialization library for Python
|
|
5
5
|
Keywords: serialization,deserialization,serde,pydantic,fastapi
|
|
6
6
|
Author: David Hagen
|
|
7
7
|
Author-email: David Hagen <david@drhagen.com>
|
|
8
8
|
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
|
10
11
|
Classifier: Intended Audience :: Developers
|
|
11
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -4,10 +4,11 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "serialite"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.7"
|
|
8
8
|
description = "A serialization library for Python"
|
|
9
9
|
authors = [ { name = "David Hagen", email = "david@drhagen.com" } ]
|
|
10
10
|
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
11
12
|
readme = "README.md"
|
|
12
13
|
keywords = ["serialization", "deserialization", "serde", "pydantic", "fastapi"]
|
|
13
14
|
requires-python = ">=3.12"
|
|
@@ -53,7 +54,7 @@ test = [
|
|
|
53
54
|
"httpx", # Needed by starlette testclient
|
|
54
55
|
]
|
|
55
56
|
lint = [
|
|
56
|
-
"ruff == 0.
|
|
57
|
+
"ruff == 0.14.*"
|
|
57
58
|
]
|
|
58
59
|
|
|
59
60
|
[tool.uv]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
__all__ = [
|
|
4
|
-
"FieldsSerializer",
|
|
5
4
|
"AccessPermissions",
|
|
5
|
+
"FieldsSerializer",
|
|
6
6
|
"FieldsSerializerField",
|
|
7
|
-
"SingleField",
|
|
8
7
|
"MultiField",
|
|
9
|
-
"
|
|
8
|
+
"SingleField",
|
|
10
9
|
"empty_default",
|
|
10
|
+
"no_default",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
from collections.abc import Mapping
|
|
@@ -150,10 +150,8 @@ class MultiField(FieldsSerializerField):
|
|
|
150
150
|
cleaned_field_serializers = {}
|
|
151
151
|
for name, field in serializers.items():
|
|
152
152
|
# Serializers can be instances or subclasses of base class Serializer
|
|
153
|
-
if (
|
|
154
|
-
isinstance(field, Serializer)
|
|
155
|
-
or isinstance(field, type)
|
|
156
|
-
and issubclass(field, Serializer)
|
|
153
|
+
if isinstance(field, Serializer) or (
|
|
154
|
+
isinstance(field, type) and issubclass(field, Serializer)
|
|
157
155
|
):
|
|
158
156
|
cleaned_field_serializers[name] = field
|
|
159
157
|
else:
|
|
@@ -180,10 +178,8 @@ class FieldsSerializer(Mapping):
|
|
|
180
178
|
for name, field in object_field_serializers.items():
|
|
181
179
|
if isinstance(field, FieldsSerializerField):
|
|
182
180
|
cleaned_object_field_serializers[name] = field
|
|
183
|
-
elif (
|
|
184
|
-
isinstance(field, Serializer)
|
|
185
|
-
or isinstance(field, type)
|
|
186
|
-
and issubclass(field, Serializer)
|
|
181
|
+
elif isinstance(field, Serializer) or (
|
|
182
|
+
isinstance(field, type) and issubclass(field, Serializer)
|
|
187
183
|
):
|
|
188
184
|
cleaned_object_field_serializers[name] = SingleField(field)
|
|
189
185
|
else:
|
|
@@ -10,7 +10,7 @@ class StableSet(Set[Element]):
|
|
|
10
10
|
"""An immutable set with stable iteration order."""
|
|
11
11
|
|
|
12
12
|
def __init__(self, *items: Element):
|
|
13
|
-
self._elements =
|
|
13
|
+
self._elements = dict.fromkeys(items)
|
|
14
14
|
|
|
15
15
|
def __contains__(self, item: Element):
|
|
16
16
|
return item in self._elements.keys()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
__all__ = [
|
|
4
|
-
"monkey_patch_pydantic_subclasscheck",
|
|
5
|
-
"monkey_patch_pydantic_instancecheck",
|
|
6
4
|
"monkey_patch_fastapi_create_cloned_field",
|
|
7
5
|
"monkey_patch_pydantic_get_flat_models_from_model",
|
|
6
|
+
"monkey_patch_pydantic_instancecheck",
|
|
8
7
|
"monkey_patch_pydantic_model_type_schema",
|
|
8
|
+
"monkey_patch_pydantic_subclasscheck",
|
|
9
9
|
]
|
|
10
10
|
|
|
11
11
|
from typing import TYPE_CHECKING, Any
|
|
File without changes
|