Allow extend to return a subclass of Schema#378
Merged
alecthomas merged 1 commit intoalecthomas:masterfrom Dec 31, 2018
Merged
Conversation
This updates the extend method to return the same type in case a subclass of Schema has been constructed. This is a change related to issue alecthomas#370.
1 similar comment
Owner
|
👍 |
wip-sync
pushed a commit
to NetBSD/pkgsrc-wip
that referenced
this pull request
Aug 13, 2019
Upstream changes are many minor improvements and bugfixes, plus **Changes** - [#378](alecthomas/voluptuous#378): Allow `extend()` of a `Schema` to return a subclass of a `Schema` as well. **Changes**: - [#349](alecthomas/voluptuous#349): Support Python 3.7. - [#343](alecthomas/voluptuous#343): Drop support for Python 3.3. **Changes**: - [#293](alecthomas/voluptuous#293): Support Python 3.6. - [#294](alecthomas/voluptuous#294): Drop support for Python 2.6, 3.1 and 3.2. - [#318](alecthomas/voluptuous#318): Allow to use nested schema and allow any validator to be compiled. - [#324](alecthomas/voluptuous#324): Default values MUST now pass validation just as any regular value. This is a backward incompatible change if a schema uses default values that don't pass validation against the specified schema. - [#328](alecthomas/voluptuous#328): Modify `__lt__` in Marker class to allow comparison with non Marker objects, such as str and int.
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.
This updates the extend method to return the same type in case a subclass of Schema has been constructed.
This is a change related to issue #370.
There is also a use of
Schemaon line 765 but that seems only used to merge inner dictionaries (unrelated to the top-level schema instance).