KEMBAR78
fix `model_construct` with `validation_alias` by ornariece · Pull Request #9144 · pydantic/pydantic · GitHub
Skip to content

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

@codspeed-hq
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
Contributor

@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
@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.

3 participants