marshmallow-code / marshmallow-code/marshmallow

Allow postprocess to be passed in `Schema.load`

Open
#1,192 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
738
Avg merge
1d 23h
Merged PRs (30d)
7

Description

Currently `postprocess` is harded coded to `True` for all calls to `Schema.load` and `False` for all calls to `Schema.validate`. There is a use case where I would like to load data but NOT have the `post_load` processors called. This is possible with the hidden `_do_load` method, but then libraries like `marshmallow-oneofschema` cannot be used as they call `Schema.load` directly.

Allowing `postprocess` to be passed to `Schema.load` would allow optional post-processing on calls to `load` which can easily be extended to the marshmallow ecosystem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Schema.load and the hidden _do_load method, then compare how Schema.validate handles postprocess. Check how marshmallow-oneofschema calls Schema.load; done means load accepts an optional postprocess setting that can skip post_load processors without requiring direct _do_load access.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.