Repository navigation
fix(base): preserve typed serialization results for dataclasses - #7699
DevChiniwala wants to merge 2 commits into
Conversation
[Low impact] The PR appears safe to merge. SummaryFixes
No actionable issues found. Tests were inspected but not run during this review. Reviews (2) · Last reviewed commit: "fix(base): reconcile dataclass serialize..." · Reviewed by Greptile |
|
Synced current main in Validation on Linux / Python 3.14:
The pushed tree is limited to the serializer fix, its regression module and the existing news fragment. Hosted validation on this new commit still needs maintainer workflow approval. |
serialize(value, get_type=True)promises a(serialized_value, type)pair, but the fallback for dataclass instances returns only the fields dictionary. Unpacking fails for zero, one, or more than two fields; with exactly two fields it silently unpacks the dictionary's keys instead of returning the serialized value and type.Return the fields dictionary together with
dictwhen type information is requested. The default serialization result stays the same, and explicitly registered serializers retain their precedence and declared output type.Validation on Linux / Python 3.14 for
911c38d970d4e45b3b1723066b4883195e538d3d:reflex-basenews fragment remains included. No generated stubs, dependency changes or unrelated product changes are authored.Hosted checks on the new head require maintainer approval; no full-repository or current-head hosted success is claimed. AI assistance: OpenAI Codex.
All Submissions
Type of change
Changes To Core Features