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

Types enhancements for Cerberus 2 #503

Closed
wants to merge 6 commits into from

Conversation

funkyfuture
Copy link
Member

this implements the proposals in #374 and adds a conversion of generic type aliases to constraints for the type rule that will be necessary to implement dataclass validation (#397). please see the changed docs for details on the features.

some notes on the pr:

  • sits on top of the changes from Some major steps forward to Cerberus 2 #497
  • there are some TODOs regarding schema normalization that are not in the scope of types and shall be solved later
  • the upgrading guide isn't updated, i prefer to do that when all changes for a new release are merged

This allows a more efficient validation, because the constraints are
always given in the same expectable form.
It also lays the ground mechanics for similar uses for other rules.
Also, object lookups in the expansion code are reduced.
They are also stricter, so that values of a subtype are not matching.
@funkyfuture funkyfuture added this to the 2.0 milestone Jul 16, 2019
This is essential for a later implementation of dataclass instances.
…around helpers in its typing module
@funkyfuture
Copy link
Member Author

merged with 2a6e2b0

@funkyfuture funkyfuture closed this Nov 8, 2019
@funkyfuture funkyfuture deleted the types_enhancements branch February 9, 2020 16:15
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.

1 participant