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

Validating existing models #155

Closed
samuelcolvin opened this issue Jul 7, 2022 · 0 comments · Fixed by #177
Closed

Validating existing models #155

samuelcolvin opened this issue Jul 7, 2022 · 0 comments · Fixed by #177

Comments

@samuelcolvin
Copy link
Member

As per #21 we need to make sure values are copied.

As @tiangolo points out at in pydantic/pydantic#4218 (comment) we need to be able to validate a model without relying on isinstance.

I think we should therefore change how existing models are validated to effectively revalidate model.__dict__. That should solving copying (of models at least) and avoid subclasses being validated as parent classes.

This might have some performance impact, but it'll be much smaller than a hack in python to work around it.

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 a pull request may close this issue.

1 participant