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 model_construct with validation_alias #9144

Merged

Conversation

ornariece
Copy link
Contributor

@ornariece ornariece commented Apr 1, 2024

Change Summary

just like you can construct a model using a field alias, this PR fixes constructing a model using validation_alias.

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @dmontagu

@ornariece
Copy link
Contributor Author

please review

Copy link

codspeed-hq bot commented Apr 1, 2024

CodSpeed Performance Report

Merging #9144 will not alter performance

Comparing ornariece:model_validate_with_validation_alias (a20b693) with main (8128821)

Summary

✅ 13 untouched benchmarks

@sydney-runkle sydney-runkle added the relnotes-fix Used for bugfixes. label Apr 2, 2024
Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@sydney-runkle sydney-runkle merged commit fc0cb91 into pydantic:main Apr 2, 2024
53 of 55 checks passed
@ornariece ornariece deleted the model_validate_with_validation_alias branch April 2, 2024 14:42
NeevCohen pushed a commit to NeevCohen/pydantic that referenced this pull request Apr 7, 2024
Co-authored-by: ornariece <37-ornariece@users.noreply.git.malined.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants