👋 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
👋 Just dropping by to let you know that marshmallow v3 is released.
Upgrading will provide a few benefits for this project:
load_fromanddump_tomatch, since they've been merged into a single parameter,data_key.DLWorkspace/src/ClusterManager/job.py
Line 152 in bb8ee5b
You could even do automatic camel-casing using this snippet: https://marshmallow.readthedocs.io/en/latest/examples.html#inflection-camel-casing-keys
fields.Dictto validate the type of keys and values: https://marshmallow.readthedocs.io/en/stable/api_reference.html#marshmallow.fields.DictAfter skimming the codebase, it looks like the migration will be straightforward.
load_fromanddump_towithdata_key.JobSchema.load[s]to expect the deserialized data as the return value instead of a tuple. Instead of getting the errors from a tuple, handleValidationErrors.