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

fix(python): pydantic V2 .dict calls once again use dict merging #4542

Merged
merged 11 commits into from
Sep 6, 2024

Conversation

armandobelardo
Copy link
Contributor

@armandobelardo armandobelardo commented Sep 5, 2024

Fixes FER-3120

Pydantic V2 .dict calls are updated to be back to pre-3.10.4 logic.

This is fix a regression where nested literals were being omitted due to the Pydantic V2 serializers not respecting the recursive .dict logic, as Pydantic V2 shells out model_dump calls to Rust library and serializers, as opposed to recursively calling model_dump.

It is expected that performance will not be degraded given the Rust-based serializers have optimized performance, compared to the Pydantic V1 .dict approach.

I've also added onto the literal fixture to add a nested object to catch this moving forward

@armandobelardo armandobelardo merged commit 86ac542 into main Sep 6, 2024
37 of 38 checks passed
@armandobelardo armandobelardo deleted the ab/python-dict branch September 6, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants