Skip to content
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

Allow extend to return a subclass of Schema #378

Merged
merged 1 commit into from
Dec 31, 2018

Conversation

svisser
Copy link
Collaborator

@svisser svisser commented Dec 28, 2018

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 Schema on line 765 but that seems only used to merge inner dictionaries (unrelated to the top-level schema instance).

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.
@svisser svisser self-assigned this Dec 28, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 95.366% when pulling e11b20a on svisser:fix/issue_370 into c2e1cfd on alecthomas:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 95.366% when pulling e11b20a on svisser:fix/issue_370 into c2e1cfd on alecthomas:master.

@alecthomas alecthomas merged commit 9644956 into alecthomas:master Dec 31, 2018
@alecthomas
Copy link
Owner

👍

@svisser svisser deleted the fix/issue_370 branch December 31, 2018 01:33
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants