Repository navigation
Conversation
format_prop's dict branch called serializers.serialize_dict, which no longer exists, so a plain dict raised AttributeError instead of being formatted. Every framework caller passes a Var or EventChain and returns before reaching it, so the branch was dead internally. Let dicts fall through to json_dumps like every other literal, which encodes nested values through the registered serializers. Closes ENG-10109. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VmkRjNPQfbihbxXpYNqXh6
Contributor
There was a problem hiding this comment.
No issues found across 3 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
Contributor
[Medium impact] The PR appears safe to merge. SummaryFixes
Reviews (1) · Last reviewed commit: "fix: remove dead serialize_dict call in ..." · Reviewed by Greptile |
Merging this PR will not alter performance
|
This branch has not been deployed
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.
Requested by Masen · project thread
Before:
format_prop({"a": 1})raisedAttributeError: module 'reflex_base.utils.serializers' has no attribute 'serialize_dict'. The dict branch informat_propcalled a serializer that no longer exists, hidden behind a pyright-ignore.After: a plain dict is JSON-encoded like every other literal and wrapped in braces, so
format_prop({"a": 1})returns{{"a": 1}}.The branch was unreachable from inside the framework, since every internal caller passes a
VarorEventChainand returns earlier; only direct callers with a raw dict hit it.How: drop the
isinstance(prop, dict)branch and the unusedserializersimport so dicts fall through tojson_dumps, which already encodes nested values through the registered serializers. Adds a regression test and areflex-basenews fragment.Closes ENG-10109.
Type of change
Changes To Core Features:
Generated by Claude Code