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

HOTFIX: Ensure we use the alias when exporting #29010

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

bnchrch
Copy link
Contributor

@bnchrch bnchrch commented Aug 2, 2023

Overview

Pydantic doesnt handle fields that start with a _ well and instead chooses to

  1. Prepend field
  2. Use the _abc field name as an alias

This is a problem when converted back to json or a dict as it prefers to use the field_ definition and not the alias

Note for reviewer

Im quickly merging in this fix to unblock a P0 and introducing a much more thorough PR right after

@bnchrch
Copy link
Contributor Author

bnchrch commented Aug 2, 2023

/approve-and-merge reason="prepublish fix"

@octavia-approvington
Copy link
Contributor

Myomoto says it looks good
thats a niiice

@octavia-approvington octavia-approvington merged commit f823c0f into master Aug 2, 2023
@octavia-approvington octavia-approvington deleted the bnchrch/fix/alias-pydantic branch August 2, 2023 19:34
bnchrch added a commit that referenced this pull request Aug 3, 2023
* Ensure we use the alias when exporting

* bump lock file
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.

2 participants