fix: canonicalize the pythonic serializer alias to auto#192
Conversation
auto and pythonic are documented aliases for the same AutoSerializer, but only std/standard canonicalized to default. An entry written with serializer='auto' stored 's':'auto' in the frame, while a handler configured serializer='pythonic' compared against the literal 'pythonic' — a serializer mismatch that treated every read as a miss and recomputed. Collapse interchangeable names to one canonical frame tag via a shared alias map. Closes #167.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughAdds a ChangesSerializer Alias Canonicalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
autoandpythonicare documented aliases for the sameAutoSerializer, butcache_handleronly canonicalizedstd/standard→default. An entry written withserializer="auto"stored's':'auto'in the CK frame; a handler configuredserializer="pythonic"compared the stored tag against the literal'pythonic'→ serializer mismatch → treated as a miss → recompute on every read.Fix: collapse interchangeable names to one canonical frame tag via a shared
_SERIALIZER_NAME_ALIASESmap (addspythonic→auto;std/standard→defaultunchanged).Closes #167.
Tests
New
tests/unit/test_serializer_alias_canonicalization.py: write-auto/read-pythonicand the reverse round-trip; both aliases resolve to the same stored tag;std/defaultcanonicalization preserved. Full suite: 1854 passed, basedpyright 0 errors.Fold-in
Small
fix:intended to ride into 0.10.1 alongside #155 / #156 / #157.Summary by CodeRabbit
Bug Fixes
Tests