Fix generic required#742
Merged
samuelcolvin merged 3 commits intopydantic:v0.32.xfrom Aug 11, 2019
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## v0.32.x #742 +/- ##
======================================
Coverage 100% 100%
======================================
Files 15 15
Lines 2729 2729
Branches 541 541
======================================
Hits 2729 2729 |
Contributor
|
@samuelcolvin this looks good to me. (I'm not sure whether the change to @amitbl good catch! Thanks for this. |
Member
|
changing version is ok, this ambiguity will hopefully be fixed in v1 anyway, I would guess it's coped from #740. |
samuelcolvin
added a commit
that referenced
this pull request
Oct 1, 2019
* fix(validate-assignment): do not validate extra fields when `vaidate_assignment` is on * Update history * Fix `value` vs. `value_` * Add tests for `value` vs `value_` case * uprev * Fix generic required (#742) * Fix required fields on GenericModel * lint * version up * __post_init__ with inheritance, fix #739 (#740) * Fix custom Schema on GenericModel fields (#754) * Fix custom Schema on GenericModel fields * Add PR# * uprev * Fix error messages for Literal types with multiple allowed values (#770) * Fix error messages for Literal types with multiple allowed values * Incorporate feedback * update history
andreshndz
pushed a commit
to cuenca-mx/pydantic
that referenced
this pull request
Jan 17, 2020
* fix(validate-assignment): do not validate extra fields when `vaidate_assignment` is on * Update history * Fix `value` vs. `value_` * Add tests for `value` vs `value_` case * uprev * Fix generic required (pydantic#742) * Fix required fields on GenericModel * lint * version up * __post_init__ with inheritance, fix pydantic#739 (pydantic#740) * Fix custom Schema on GenericModel fields (pydantic#754) * Fix custom Schema on GenericModel fields * Add PR# * uprev * Fix error messages for Literal types with multiple allowed values (pydantic#770) * Fix error messages for Literal types with multiple allowed values * Incorporate feedback * update history
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Currently, required fields on GenericModel classes are being silently ignored and automatically being set to
Noneas default value, This commit fixes this behavior, raisingValidationErrorwhen a value is not supplied.Related issue number
Checklist
changes/<pull request or issue id>-<github username>.rstfile added describing change(see changes/README.md for details)