Skip to content

Fix experimental MessagePack round trips with current msgpack - #396

Merged
AndreyVMarkelov merged 1 commit into
dropbox:mainfrom
Shubham-Padkonde:fix/msgpack-roundtrip
Oct 7, 2026
Merged

AndreyVMarkelov merged 1 commit into
dropbox:mainfrom
Shubham-Padkonde:fix/msgpack-roundtrip

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown
Contributor

MessagePack round trips currently raise TypeError with msgpack 1.x because the encoder and decoder still pass the removed encoding argument. This updates the experimental serializer to use binary-aware encoding and decoding, while preserving arbitrary bytes written using the legacy raw representation.

The decoder now also forwards alias_validators and strict by name: positional forwarding was binding them to the wrong arguments after caller_permissions was added. MessagePack is included in the test dependencies so this path is exercised.

Validation: all 198 tests pass on Linux with msgpack 1.2.3. Nine new regression cases failed before the fix and pass afterward, covering Unicode, binary collections, legacy raw bytes, alias validation, and strict decoding. Flake8 passes for the changed Python files. Two existing tests encounter Windows-specific filesystem/whitespace failures; the complete Linux run passes.

@ineil-dbx

Copy link
Copy Markdown

Hi @Shubham-Padkonde, I’ve raised this with our engineering team for further review. They’ll be able to review the pull request and address it as appropriate.

@AndreyVMarkelov
AndreyVMarkelov self-requested a review October 7, 2026 16:07
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.36%. Comparing base (1ad079b) to head (6d27c6a).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #396      +/-   ##
==========================================
+ Coverage   49.98%   52.36%   +2.37%     
==========================================
  Files          37       42       +5     
  Lines        8808    11451    +2643     
  Branches     1892     2393     +501     
==========================================
+ Hits         4403     5996    +1593     
- Misses       4087     4922     +835     
- Partials      318      533     +215     
Flag Coverage Δ
unit 52.36% <100.00%> (+2.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndreyVMarkelov
AndreyVMarkelov merged commit 500f778 into dropbox:main Oct 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants