-
Notifications
You must be signed in to change notification settings - Fork 421
feat(parser): Allow primitive data types to be parsed using TypeAdapter #4502
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
Conversation
|
|
1 similar comment
|
Before I start reviewing this PR, I'm curious as to why CI wasn't run here. Any thoughts @sthulb? |
I'd like to say I know why, but I don't 😂 |
Hey @sthulb, I was reviewing this PR and exploring more use cases where When it comes to Pydantic v2, there are no significant performance changes when using In my point of view I think we can move forward with this solution and fix some small things in this PR. I'll schedule a discussion with you and @heitorlessa to talk about this. Thanks Things missing in this PR
|
Hi @sthulb! Thank you for addressing all the feedback! I've made a few minor changes, such as creating a dedicated function to handle the cache. Since we need to use this in two places, I believe this approach makes more sense. I've also removed the pydanticv1 compatibility, as we no longer require it. Additionally, I've created end-to-end (e2e) tests and a performance test. @heitorlessa we need a final review here before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHIIIIPPPPP IT!!
Superb work you two!
|
Issue number: #2734
Summary
This PR allows customers to use union types as per #2734.
Changes
This change adopts the
TypeAdapter
from Pydantic v2 to allow the parser and base envelope to validate between the potentially different types.User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.