-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: update all modified field values in root_validator
when validate_assignment
is on
#2119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update all modified field values in root_validator
when validate_assignment
is on
#2119
Conversation
…ate_assignment` is on closes pydantic#2116
Codecov Report
@@ Coverage Diff @@
## master #2119 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 4093 4093
Branches 823 823
=========================================
Hits 4093 4093 Continue to review full report at Codecov.
|
All reactions
Sorry, something went wrong.
@samuelcolvin I took the liberty to add the |
All reactions
Sorry, something went wrong.
Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com>
* fix: ignore `__doc__` as valid private attribute (#2091) closes #2090 * Fixes a regression where Enum fields would not propagate keyword arguments to the schema (#2109) fix #2108 * Fix schema extra not being included when field type is Enum * Code format * More code format * Add changes file Co-authored-by: Ben Martineau <b.martineau@iwoca.co.uk> * fix: update all modified field values in `root_validator` when `validate_assignment` is on (#2119) * fix: update all modified field values in `root_validator` when `validate_assignment` is on closes #2116 * chore: update root_validator name Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com> Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com> * fix: support `underscore_attrs_are_private` with generic models (#2139) closes #2138 * fix: set right default value for required (optional) fields (#2143) closes #2142 * Fix #2111: support pickle for built-in dataclasses (#2114) * 2111: support pickle for built-in dataclasses * 2111: add changes * 2111: simplify test * return original name + handle similar names * add additional check * fix a misspell * remove useless f-string * cleanup test Co-authored-by: Samuel Colvin <s@muelcolvin.com> * uprev and add history * tempoarily pin pip Co-authored-by: Eric Jolibois <em.jolibois@gmail.com> Co-authored-by: Ben Martineau <bm424@cam.ac.uk> Co-authored-by: Ben Martineau <b.martineau@iwoca.co.uk> Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com> Co-authored-by: aimestereo <aimestereo@gmail.com>
art049
Successfully merging this pull request may close these issues.
validate_assignment with side effect validators
Change Summary
Following #1971 we now run
root_validator
on assignment whenConfig.validate_assignment
is set.But we still only updated the assigned field and not all concerned fields
ℹ️ Not really a regression but more a fix to #1972 in v1.7.0
Related issue number
closes #2116
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)