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

Move preferred alias resolution to private method #507

Merged
merged 5 commits into from
Dec 31, 2024

Conversation

kschwab
Copy link
Contributor

@kschwab kschwab commented Dec 18, 2024

Fixes #504

Reverts #481 and instead moves preferred alias resolution into private method.

If desired, the private method could be made public in V3.

@kschwab kschwab changed the title Add use_preferred_alias flag to get_field_value. Move preferred alias resolution to private method Dec 20, 2024
@kschwab kschwab marked this pull request as ready for review December 20, 2024 14:01
@hramezani
Copy link
Member

Thanks @kschwab for updating the PR.

Please add a comment somewhere and suggest what we should do in V3.

@kschwab
Copy link
Contributor Author

kschwab commented Dec 30, 2024

Sure @hramezani, added V3 docstring comment 👍🏾

@hramezani
Copy link
Member

Thanks @kschwab

@hramezani hramezani merged commit 66ecc3a into pydantic:main Dec 31, 2024
21 checks passed
@kschwab kschwab deleted the add-use-preferred-alias-flag branch December 31, 2024 18:47
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 this pull request may close these issues.

EnvSettingsSource get_field_value returns field_name instead of the env name.
2 participants