"marshmallow-constant-required"
# `fields.Constant` with `required=True` flag raised `load_default` warning
I have a schema containing a `Constant`, with `required=True` set, as the schema is ultimately exported to an OpenAPI spec, and the field must be marked as `required` there.
The fix from #2894 now triggers the validation failure in https://github.com/marshmallow-code/marshmallow/blob/2a3812d5049c83e98db60a0869919521f97cd77d/src/marshmallow/fields.py#L216
My feeling on the fix is to undo the changes from #2894 and instead reproduce the `allow_none` flag initialization in `Constant.__init__`
Happy to create a PR if you'd be happy with this fix.
This page does not claim that every requirement marked done was demonstrated able to fail first — either nothing is done yet, or one of the proofs could not be followed from the evidence in this repository.
1 requirement · 0 done and proved · 0 holding up the handover
UNTRANSLATED# `fields.Constant` with `required=True` flag raised `load_default` warning I have a schema containing a `Constant`, with `required=True` set, as the schema is ultimately exported to an OpenAPI spec, and the field must be marked as `required` there. The fix from #2894 now triggers the validation fai
Wringer said, and this board has no plain-English wording for it yetno gate proves this criterion, and its witness evidences nothing (the runner could not collect it (exit 2), so its red says nothing about the criterion — a witness red for a load failure turns green the moment any file of that name exists) — a human decides
What this page does not claim — Wringer's own words, unedited
- Evidenced means the bound gate passed and has demonstrably failed before. It does not mean the criterion is what the user needed, that the gate covers the criterion's whole meaning, or that coverage cannot narrow later — `wring health` watches that across time.
- The gate-to-criterion binding is a human's declaration. Wringer checks the binding's consequences, never its wisdom.
- Human criteria are answered by people. Nothing here scored them.
- A sensitivity receipt says the gate's result differed between the two trees, not that the difference was the change. A gate whose own command arrived with the change reads sensitive for that reason alone — the citation beside it is how you tell.
- A witness proves the stated criterion could fail and was made to pass. It does not certify agreement with an unstated intended fix, and where the criterion under-describes the intent the witness inherits that gap. Nothing here catches a change that satisfies the criterion and is still wrong.
- A witness evidences ONE criterion. A manufactured fail-to-pass check is necessary and demonstrably not sufficient — it raises the floor and does not make a delivery safe.
- The pin is tamper-EVIDENT, not tamper-proof: a worker on the host can read and rewrite what it finds there. It becomes a boundary only under run.containment.
For engineers
- acceptance record:
wringer.acceptance.v2 - verifications in this loop: 1