Merged
Conversation
giograno
approved these changes
Feb 27, 2026
Member
giograno
left a comment
There was a problem hiding this comment.
That's great work 💯
I strongly approve the idea of being more strict in what we allow to serialize instead of allowing the world to come in ❗
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When working on wrapped records, it was shown that we could not determine at runtime the type of such a record, or a typed dictionary. We cannot know what is contained, and how to deserialize the values contained in them.
So for this reason, we're disallowing such unions. We're also switching to a custom marker for TypedDict missing data, because we would create such union of
dict | strmanually. By using a custom marker, we can separate them, and in our logic, make sure to differentiate that case to drop the custom marker type.The PR also reverts the runtime type for wrapped record, as we cannot have Unions with them anymore