marshmallow 4.0.0__py3-none-any.whl → 4.0.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.
marshmallow/__init__.py CHANGED
@@ -23,7 +23,6 @@ __all__ = [
23
23
  "missing",
24
24
  "post_dump",
25
25
  "post_load",
26
- "pprint",
27
26
  "pre_dump",
28
27
  "pre_load",
29
28
  "validates",
marshmallow/exceptions.py CHANGED
@@ -20,7 +20,6 @@ class ValidationError(MarshmallowError):
20
20
  :param message: An error message, list of error messages, or dict of
21
21
  error messages. If a dict, the keys are subitems and the values are error messages.
22
22
  :param field_name: Field name to store the error on.
23
- If `None`, the error is stored as schema-level error.
24
23
  :param data: Raw input data.
25
24
  :param valid_data: Valid (de)serialized data.
26
25
  """
marshmallow/fields.py CHANGED
@@ -1,4 +1,4 @@
1
- # ruff: noqa: F841, SLF001
1
+ # ruff: noqa: SLF001
2
2
  from __future__ import annotations
3
3
 
4
4
  import abc
@@ -530,7 +530,7 @@ class Nested(Field):
530
530
  else:
531
531
  nested = typing.cast("Schema", self.nested)
532
532
  # defer the import of `marshmallow.schema` to avoid circular imports
533
- from marshmallow.schema import Schema
533
+ from marshmallow.schema import Schema # noqa: PLC0415
534
534
 
535
535
  if isinstance(nested, dict):
536
536
  nested = Schema.from_dict(nested)
@@ -558,7 +558,7 @@ class Nested(Field):
558
558
  f"`Schema`, not {nested.__class__}."
559
559
  )
560
560
  else:
561
- schema_class = class_registry.get_class(nested, all=False)
561
+ schema_class = class_registry.get_class(nested, all=False) # type: ignore[unreachable]
562
562
  self._schema = schema_class(
563
563
  many=self.many,
564
564
  only=self.only,
@@ -591,7 +591,9 @@ class Nested(Field):
591
591
  raise self.make_error("type", input=value, type=value.__class__.__name__)
592
592
 
593
593
  def _load(
594
- self, value: typing.Any, partial: bool | types.StrSequenceOrSet | None = None
594
+ self,
595
+ value: typing.Any,
596
+ partial: bool | types.StrSequenceOrSet | None = None, # noqa: FBT001
595
597
  ):
596
598
  try:
597
599
  valid_data = self.schema.load(value, unknown=self.unknown, partial=partial)
@@ -606,7 +608,7 @@ class Nested(Field):
606
608
  value: typing.Any,
607
609
  attr: str | None,
608
610
  data: typing.Mapping[str, typing.Any] | None,
609
- partial: bool | types.StrSequenceOrSet | None = None,
611
+ partial: bool | types.StrSequenceOrSet | None = None, # noqa: FBT001
610
612
  **kwargs,
611
613
  ):
612
614
  """Same as :meth:`Field._deserialize` with additional ``partial`` argument.
marshmallow/orderedset.py CHANGED
@@ -23,7 +23,7 @@
23
23
  from collections.abc import MutableSet
24
24
 
25
25
 
26
- class OrderedSet(MutableSet):
26
+ class OrderedSet(MutableSet): # noqa: PLW1641
27
27
  def __init__(self, iterable=None):
28
28
  self.end = end = []
29
29
  end += [None, end, end] # sentinel node for doubly linked list
marshmallow/schema.py CHANGED
@@ -550,7 +550,7 @@ class Schema(metaclass=SchemaMeta):
550
550
  :return: Serialized data
551
551
 
552
552
  .. versionchanged:: 3.0.0b7
553
- This method returns the serialized data rather than a ``(data, errors)`` duple.
553
+ This method returns the serialized data rather than a ``(data, errors)`` tuple.
554
554
  A :exc:`ValidationError <marshmallow.exceptions.ValidationError>` is raised
555
555
  if ``obj`` is invalid.
556
556
  .. versionchanged:: 3.0.0rc9
@@ -582,7 +582,7 @@ class Schema(metaclass=SchemaMeta):
582
582
  :return: A ``json`` string
583
583
 
584
584
  .. versionchanged:: 3.0.0b7
585
- This method returns the serialized data rather than a ``(data, errors)`` duple.
585
+ This method returns the serialized data rather than a ``(data, errors)`` tuple.
586
586
  A :exc:`ValidationError <marshmallow.exceptions.ValidationError>` is raised
587
587
  if ``obj`` is invalid.
588
588
  """
@@ -723,7 +723,7 @@ class Schema(metaclass=SchemaMeta):
723
723
  :return: Deserialized data
724
724
 
725
725
  .. versionchanged:: 3.0.0b7
726
- This method returns the deserialized data rather than a ``(data, errors)`` duple.
726
+ This method returns the deserialized data rather than a ``(data, errors)`` tuple.
727
727
  A :exc:`ValidationError <marshmallow.exceptions.ValidationError>` is raised
728
728
  if invalid data are passed.
729
729
  """
@@ -757,7 +757,7 @@ class Schema(metaclass=SchemaMeta):
757
757
  :return: Deserialized data
758
758
 
759
759
  .. versionchanged:: 3.0.0b7
760
- This method returns the deserialized data rather than a ``(data, errors)`` duple.
760
+ This method returns the deserialized data rather than a ``(data, errors)`` tuple.
761
761
  A :exc:`ValidationError <marshmallow.exceptions.ValidationError>` is raised
762
762
  if invalid data are passed.
763
763
  .. versionchanged:: 4.0.0
marshmallow/utils.py CHANGED
@@ -1,6 +1,5 @@
1
1
  """Utility methods for marshmallow."""
2
2
 
3
- # ruff: noqa: T201, T203
4
3
  from __future__ import annotations
5
4
 
6
5
  import datetime as dt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: marshmallow
3
- Version: 4.0.0
3
+ Version: 4.0.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>
@@ -22,11 +22,11 @@ Requires-Dist: marshmallow[tests] ; extra == "dev"
22
22
  Requires-Dist: tox ; extra == "dev"
23
23
  Requires-Dist: pre-commit>=3.5,<5.0 ; extra == "dev"
24
24
  Requires-Dist: autodocsumm==0.2.14 ; extra == "docs"
25
- Requires-Dist: furo==2024.8.6 ; extra == "docs"
25
+ Requires-Dist: furo==2025.7.19 ; extra == "docs"
26
26
  Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "docs"
27
27
  Requires-Dist: sphinx-issues==5.0.1 ; extra == "docs"
28
28
  Requires-Dist: sphinx==8.2.3 ; extra == "docs"
29
- Requires-Dist: sphinxext-opengraph==0.10.0 ; extra == "docs"
29
+ Requires-Dist: sphinxext-opengraph==0.12.0 ; extra == "docs"
30
30
  Requires-Dist: pytest ; extra == "tests"
31
31
  Requires-Dist: simplejson ; extra == "tests"
32
32
  Project-URL: Changelog, https://marshmallow.readthedocs.io/en/latest/changelog.html
@@ -1,19 +1,19 @@
1
- marshmallow/__init__.py,sha256=EEHr24mHh2kH_pszxdnToOfBG6Z2wqeOKbb0iiDGFv4,587
1
+ marshmallow/__init__.py,sha256=9XHBRTrPmbVaU-Z8CWo8nlcf9Z5VvkRD37d1luJuAaM,573
2
2
  marshmallow/class_registry.py,sha256=HTC9srCEaRsiy5L_vUKQso7IQfeZeRXxZfz4_2NitoM,3029
3
3
  marshmallow/constants.py,sha256=maYmT3pvjQgfummof45SJI_pDqHDFWSu3knVN7su78M,374
4
4
  marshmallow/decorators.py,sha256=CwD37uih8cyquwYGv-qKVPUUtKmj4tgas45AKwTdlZk,9987
5
5
  marshmallow/error_store.py,sha256=iCPSdw8nJGiS4fjWuIAY1aSI_Hhckcdo3l_g-7pjaMw,2240
6
- marshmallow/exceptions.py,sha256=CFb7Xb4KNIqsWycl6cUYlrQFGyNBR7zm18HI0BbXs_I,2335
7
- marshmallow/fields.py,sha256=CIpnQ_MzX6h4_yO81mR0nJg34CjvieGYFQ7MQOycUOM,72081
8
- marshmallow/orderedset.py,sha256=-Lq83AWIIFs2bxptDwkHtfQ63ebX3WD3R6N3B5rRnVI,2936
6
+ marshmallow/exceptions.py,sha256=1L3ZHwQNelWU5ujIPsON5tZ6WQPk64pBGWNyfwhz608,2273
7
+ marshmallow/fields.py,sha256=oUEjjaibiB1eJpNuH0Bqzl0GdRAtEBmGRGnVXoUeEbI,72170
8
+ marshmallow/orderedset.py,sha256=adVCG4HtfYFexqZThiFsiwc_i0g8LNWI_bF6cjMz2r0,2953
9
9
  marshmallow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- marshmallow/schema.py,sha256=fIF1M3JS8wwNxrzchP7HhrtcDEn-KrLrujLqalA84S8,49904
10
+ marshmallow/schema.py,sha256=rPusgqkJpODWL0be8CZPejZYqRmnIt7V8jUmAxWWEU8,49904
11
11
  marshmallow/types.py,sha256=EAMyppcDjDmSd57IWpBRk5RFY6uPoI8CvDr4pLaBXj8,1297
12
- marshmallow/utils.py,sha256=T05FkN2S3z3Bc1jF6hfnA9jJEaUqULI3p60bGgFL8Fc,5467
12
+ marshmallow/utils.py,sha256=dFeiftZph6OgfT7TxEXx7JmSQRBUzxQXYWwhLPHvqYs,5442
13
13
  marshmallow/validate.py,sha256=X6uhUir-2DqUVzKMkEN6I8LrLPJ1mbL8RECRggByllU,23931
14
14
  marshmallow/experimental/__init__.py,sha256=5_iaUmT7_f6QML2LJXmA3xqgk5UBAgCeIazHtC1GVgc,147
15
15
  marshmallow/experimental/context.py,sha256=_4KF6sNK6pE0MckyYTGXmU3hJL2tY-TN4oVmE_eDob0,2040
16
- marshmallow-4.0.0.dist-info/licenses/LICENSE,sha256=kGtdkFHkJhRMsXOtkRZnuOvQWpxYTCwmwTWzKj7RIAE,1064
17
- marshmallow-4.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
18
- marshmallow-4.0.0.dist-info/METADATA,sha256=UsJ51KLqw0tcRrYZfoCL3mi7e1Hd9-TFKfRWYHIWEMQ,7432
19
- marshmallow-4.0.0.dist-info/RECORD,,
16
+ marshmallow-4.0.1.dist-info/licenses/LICENSE,sha256=kGtdkFHkJhRMsXOtkRZnuOvQWpxYTCwmwTWzKj7RIAE,1064
17
+ marshmallow-4.0.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
18
+ marshmallow-4.0.1.dist-info/METADATA,sha256=Be5weyeJLpW2eNSZDbNH_yKVmM28dEjHh4-gJf4JMwY,7433
19
+ marshmallow-4.0.1.dist-info/RECORD,,