Repository navigation
🐛 fix(py_info): preserve supplied JSON keys - #234
Merged
Merged
Conversation
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.
PythonInfo.to_dict()looked up each stored answer key as an attribute. An answer containingsystem_includecould expand a 63 KB response into a 300 MB disk cache entry, as issue #203 records. Serialization now keeps the supplied value. Fixes #203.A stored key invoked a computed property
from_dict()copies answer keys into instance state. Python's property descriptor takes precedence when an attribute with the same name is read, so the oldgetattrcall ransystem_includeinstead of reading the stored value. The revised serializer reads instance state while retaining the existing conversions for_creatorsandversion_info.Behavior changes
Keys in an interpreter answer now retain their supplied values during
to_dict()and cache serialization, even when they match computed properties. Explicit access toinfo.system_includestill computes the include path.Reported by Anthropic's OSS Scanner: ANT-2026-Z3HMDW60.