Marshmallow

Latest version: v3.21.2

Safety actively analyzes 623308 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 30

3.0.0b19

+++++++++++++++++++++

Features:

- Support partial loading of nested fields (:pr:`438`). Thanks
:user:`arbor-dwatson` for the PR. *Note*: Subclasses of ``fields.Nested``
now take an additional ``partial`` parameter in the ``_deserialize``
method.

Bug fixes:

- Restore ``Schema.TYPE_MAPPING``, which was removed in 3.0.0b17 (:issue:`1012`).

Other changes:

- *Backwards-incompatible*: ``_serialize`` and ``_deserialize`` methods of
all ``fields.Field`` subclasses must accept ``**kwargs`` (:pr:`1007`).

3.0.0b18

+++++++++++++++++++++

Bug fixes:

- Fix ``Date`` deserialization when using custom format (:issue:`1001`). Thanks
:user:`Ondkloss` for reporting.

Deprecations/Removals:

- ``prefix`` parameter or ``Schema`` class is removed (:issue:`991`). The same
can be achieved using a ``post_dump`` method.

3.0.0b17

+++++++++++++++++++++

Features:

- Add ``format`` option to ``Date`` field (:pr:`869`).
- *Backwards-incompatible*: Rename ``DateTime``'s ``dateformat`` Meta option
to ``datetimeformat``. ``dateformat`` now applies to ``Date`` (:pr:`869`).
Thanks :user:`knagra` for implementing these changes.
- Enforce ISO 8601 when deserializing date and time (:issue:`899`).
Thanks :user:`dushr` for the report and the work on the PR.
- *Backwards-incompatible*: Raise ``ValueError`` on ``Schema`` instantiation in
case of ``attribute`` or ``data_key`` collision (:pr:`992`).

Bug fixes:

- Fix inconsistencies in field inference by refactoring the inference feature
into a dedicated field (:issue:`809`). Thanks :user:`taion` for the PR.
- When ``unknown`` is not passed to ``Nested``, default to nested ``Schema``
``unknown`` meta option rather than ``RAISE`` (:pr:`963`).
Thanks :user:`vgavro` for the PR.
- Fix loading behavior of ``fields.Pluck`` (:pr:`990`).
- Includes bug fix from 2.16.0.

3.0.0b16

+++++++++++++++++++++

Bug fixes:

- Fix ``root`` attribute for nested container fields
on inheriting schemas (:issue:`956`). Thanks :user:`bmcbu`
for reporting.

3.0.0b15

+++++++++++++++++++++

Bug fixes:

- Raise ``ValidationError`` instead of ``TypeError`` when non-iterable types are
validated with ``many=True`` (:issue:`851`).
- ``many=True`` no longer iterates over ``str`` and ``collections.abc.Mapping`` objects and instead
raises a ``ValidationError`` with ``{'_schema': ['Invalid input type.']}`` (:issue:`930`).
- Return ``[]`` as ``ValidationError.valid_data`` instead of ``{}`` when
``many=True`` (:issue:`907`).

Thanks :user:`tuukkamustonen` for implementing these changes.

3.0.0b14

+++++++++++++++++++++

Features:

- Add ``fields.Pluck`` for serializing a single field from a nested object
(:issue:`800`). Thanks :user:`timc13` for the feedback and :user:`deckar01`
for the implementation.
- *Backwards-incompatible*: Passing a string argument as ``only`` to
``fields.Nested`` is no longer supported. Use ``fields.Pluck`` instead
(:issue:`800`).
- Raise a ``StringNotCollectionError`` if ``only`` or ``exclude`` is
passed as a string to ``fields.Nested`` (:pr:`931`).
- *Backwards-incompatible*: ``Float`` takes an ``allow_nan`` parameter to
explicitly allow serializing and deserializing special values (``nan``,
``inf`` and ``-inf``). ``allow_nan`` defaults to ``False``.

Other changes:

- *Backwards-incompatible*: ``Nested`` field now defaults to ``unknown=RAISE``
instead of ``EXCLUDE``. This harmonizes behavior with ``Schema`` that
already defaults to ``RAISE`` (:issue:`908`). Thanks :user:`tuukkamustonen`.
- Tested against Python 3.7.

Page 10 of 30

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.