marshmallow 3.26.0__tar.gz → 3.26.1__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.
- {marshmallow-3.26.0 → marshmallow-3.26.1}/CHANGELOG.rst +14 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/PKG-INFO +1 -1
- {marshmallow-3.26.0 → marshmallow-3.26.1}/pyproject.toml +1 -4
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/fields.py +1 -1
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/schema.py +9 -6
- marshmallow-3.26.1/tests/mypy_test_cases/test_schema.py +29 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/CONTRIBUTING.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/LICENSE +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/NOTICE +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/README.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/SECURITY.md +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/.gitignore +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/apple-touch-icon.png +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/custom.css +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/favicon.ico +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/marshmallow-logo-200.png +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/marshmallow-logo-with-title-for-dark-theme.png +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/marshmallow-logo-with-title.png +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/_static/marshmallow-logo.png +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/api_reference.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/authors.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/changelog.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/code_of_conduct.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/conf.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/contributing.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/custom_fields.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/dashing.json +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/donate.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/examples/index.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/examples/inflection.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/examples/quotes_api.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/examples/validating_package_json.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/custom_error_handling.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/custom_error_messages.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/custom_options.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/index.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/overriding_attribute_access.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/pre_and_post_processing_methods.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/schema_validation.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/using_context.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/using_original_input_data.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/index.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/install.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/kudos.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/license.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.class_registry.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.decorators.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.error_store.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.exceptions.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.fields.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.schema.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.types.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.utils.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/marshmallow.validate.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/nesting.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/quickstart.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/top_level.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/upgrading.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/whos_using.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/docs/why.rst +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/__init__.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/base.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/class_registry.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/decorators.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/error_store.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/exceptions.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/orderedset.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/py.typed +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/types.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/utils.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/validate.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/src/marshmallow/warnings.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/__init__.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/base.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/conftest.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/foo_serializer.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/mypy_test_cases/test_class_registry.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/mypy_test_cases/test_validation_error.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_decorators.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_deserialization.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_error_store.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_exceptions.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_fields.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_options.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_registry.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_schema.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_serialization.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_utils.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_validate.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tests/test_version_attributes.py +0 -0
- {marshmallow-3.26.0 → marshmallow-3.26.1}/tox.ini +0 -0
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
3.26.1 (2025-02-03)
|
|
5
|
+
*******************
|
|
6
|
+
|
|
7
|
+
Bug fixes:
|
|
8
|
+
|
|
9
|
+
- Typing: Fix type annotations for `class Meta <marshmallow.Schema.Meta>` options (:issue:`2804`).
|
|
10
|
+
Thanks :user:`lawrence-law` for reporting.
|
|
11
|
+
|
|
12
|
+
Other changes:
|
|
13
|
+
|
|
14
|
+
- Remove default value for the ``data`` param of `Nested._deserialize <marshmallow.fields.Nested._deserialize>` (:issue:`2802`).
|
|
15
|
+
Thanks :user:`gbenson` for reporting.
|
|
16
|
+
|
|
17
|
+
|
|
4
18
|
3.26.0 (2025-01-22)
|
|
5
19
|
*******************
|
|
6
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: marshmallow
|
|
3
|
-
Version: 3.26.
|
|
3
|
+
Version: 3.26.1
|
|
4
4
|
Summary: A lightweight library for converting complex datatypes to and from native Python datatypes.
|
|
5
5
|
Author-email: Steven Loria <sloria1@gmail.com>
|
|
6
6
|
Maintainer-email: Steven Loria <sloria1@gmail.com>, Jérôme Lafréchoux <jerome@jolimont.fr>, Jared Deckard <jared@shademaps.com>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "marshmallow"
|
|
3
|
-
version = "3.26.
|
|
3
|
+
version = "3.26.1"
|
|
4
4
|
description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
|
|
5
5
|
readme = "README.rst"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -60,10 +60,7 @@ include = [
|
|
|
60
60
|
exclude = ["docs/_build/"]
|
|
61
61
|
|
|
62
62
|
[tool.ruff]
|
|
63
|
-
src = ["src", "tests", "examples"]
|
|
64
63
|
fix = true
|
|
65
|
-
show-fixes = true
|
|
66
|
-
output-format = "full"
|
|
67
64
|
|
|
68
65
|
[tool.ruff.format]
|
|
69
66
|
docstring-code-format = true
|
|
@@ -675,7 +675,7 @@ class Nested(Field):
|
|
|
675
675
|
self,
|
|
676
676
|
value: typing.Any,
|
|
677
677
|
attr: str | None,
|
|
678
|
-
data: typing.Mapping[str, typing.Any] | None
|
|
678
|
+
data: typing.Mapping[str, typing.Any] | None,
|
|
679
679
|
partial: bool | types.StrSequenceOrSet | None = None,
|
|
680
680
|
**kwargs,
|
|
681
681
|
) -> typing.Any:
|
|
@@ -384,9 +384,9 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
|
|
|
384
384
|
.. versionchanged:: 3.26.0 Deprecate `ordered`. Field order is preserved by default.
|
|
385
385
|
"""
|
|
386
386
|
|
|
387
|
-
fields: typing.ClassVar[tuple[
|
|
387
|
+
fields: typing.ClassVar[tuple[str, ...] | list[str]]
|
|
388
388
|
"""Fields to include in the (de)serialized result"""
|
|
389
|
-
additional: typing.ClassVar[tuple[
|
|
389
|
+
additional: typing.ClassVar[tuple[str, ...] | list[str]]
|
|
390
390
|
"""Fields to include in addition to the explicitly declared fields.
|
|
391
391
|
`additional <marshmallow.Schema.Meta.additional>` and `fields <marshmallow.Schema.Meta.fields>`
|
|
392
392
|
are mutually-exclusive options.
|
|
@@ -396,7 +396,7 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
|
|
|
396
396
|
usually better to define fields as class variables, but you may need to
|
|
397
397
|
use this option, e.g., if your fields are Python keywords.
|
|
398
398
|
"""
|
|
399
|
-
exclude: typing.ClassVar[tuple[
|
|
399
|
+
exclude: typing.ClassVar[tuple[str, ...] | list[str]]
|
|
400
400
|
"""Fields to exclude in the serialized result.
|
|
401
401
|
Nested fields can be represented with dot delimiters.
|
|
402
402
|
"""
|
|
@@ -408,7 +408,10 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
|
|
|
408
408
|
"""Default format for `DateTime <marshmallow.fields.DateTime>` fields."""
|
|
409
409
|
timeformat: typing.ClassVar[str]
|
|
410
410
|
"""Default format for `Time <marshmallow.fields.Time>` fields."""
|
|
411
|
-
|
|
411
|
+
|
|
412
|
+
# FIXME: Use a more constrained type here.
|
|
413
|
+
# ClassVar[RenderModule] doesn't work.
|
|
414
|
+
render_module: typing.Any
|
|
412
415
|
""" Module to use for `loads <marshmallow.Schema.loads>` and `dumps <marshmallow.Schema.dumps>`.
|
|
413
416
|
Defaults to `json` from the standard library.
|
|
414
417
|
"""
|
|
@@ -416,9 +419,9 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
|
|
|
416
419
|
"""If `True`, `Schema.dump <marshmallow.Schema.dump>` is a `collections.OrderedDict`."""
|
|
417
420
|
index_errors: typing.ClassVar[bool]
|
|
418
421
|
"""If `True`, errors dictionaries will include the index of invalid items in a collection."""
|
|
419
|
-
load_only: typing.ClassVar[tuple[
|
|
422
|
+
load_only: typing.ClassVar[tuple[str, ...] | list[str]]
|
|
420
423
|
"""Fields to exclude from serialized results"""
|
|
421
|
-
dump_only: typing.ClassVar[tuple[
|
|
424
|
+
dump_only: typing.ClassVar[tuple[str, ...] | list[str]]
|
|
422
425
|
"""Fields to exclude from serialized results"""
|
|
423
426
|
unknown: typing.ClassVar[str]
|
|
424
427
|
"""Whether to exclude, include, or raise an error for unknown fields in the data.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from marshmallow import EXCLUDE, Schema
|
|
4
|
+
from marshmallow.fields import Integer, String
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Test that valid `Meta` class attributes pass type checking
|
|
8
|
+
class MySchema(Schema):
|
|
9
|
+
foo = String()
|
|
10
|
+
bar = Integer()
|
|
11
|
+
|
|
12
|
+
class Meta(Schema.Meta):
|
|
13
|
+
fields = ("foo", "bar")
|
|
14
|
+
additional = ("baz", "qux")
|
|
15
|
+
include = {
|
|
16
|
+
"foo2": String(),
|
|
17
|
+
}
|
|
18
|
+
exclude = ("bar", "baz")
|
|
19
|
+
many = True
|
|
20
|
+
dateformat = "%Y-%m-%d"
|
|
21
|
+
datetimeformat = "%Y-%m-%dT%H:%M:%S"
|
|
22
|
+
timeformat = "%H:%M:%S"
|
|
23
|
+
render_module = json
|
|
24
|
+
ordered = False
|
|
25
|
+
index_errors = True
|
|
26
|
+
load_only = ("foo", "bar")
|
|
27
|
+
dump_only = ("baz", "qux")
|
|
28
|
+
unknown = EXCLUDE
|
|
29
|
+
register = False
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{marshmallow-3.26.0 → marshmallow-3.26.1}/docs/extending/pre_and_post_processing_methods.rst
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|