-
Notifications
You must be signed in to change notification settings - Fork 233
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
Calling __init__
when parsing nested models
#440
Comments
problem is that V2 does let instance = (*raw_type).tp_new ...;
force_setattr(py, instance, intern!(py, "__dict__"), model_dict)?;
...
force_setattr(py, instance, intern!(py, "__fields_set__"), fields_set)?; Thereby, see pydantic-core/src/validators/model.rs Lines 133 to 152 in d7ff64d
|
Solution: we'll tell people to use a
|
This was fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In pydantic v1:
This results in:
This doesn't currently work with the way validation happens in v2.
(@samuelcolvin you wanted me to create an issue about this — feel free to add color.)
The text was updated successfully, but these errors were encountered: