Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Upgrade to marshmallow 3#517

Description

@sloria

馃憢 Just dropping by to let you know that marshmallow v3 is released.

Upgrading will provide a few benefits for this project:

dump_to="jobId", load_from="jobId",

You could even do automatic camel-casing using this snippet: https://marshmallow.readthedocs.io/en/latest/examples.html#inflection-camel-casing-keys

After skimming the codebase, it looks like the migration will be straightforward.

  • Replace usages of load_from and dump_to with data_key.
  • Update call sites of JobSchema.load[s] to expect the deserialized data as the return value instead of a tuple. Instead of getting the errors from a tuple, handle ValidationErrors.
from marshmallow import ValidationError


try:
    job_object = JobSchema.load(job)
except ValidationError as error:
    errors = error.messages

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions