-
-
Notifications
You must be signed in to change notification settings - Fork 449
feat: move 'msgpack' to optional dependencies #3526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
return base64.b64decode(val) | ||
return obj | ||
|
||
class msgpack: # type:ignore[no-redef] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is clever, does this ensure both forward and backward compatibility? json loads msgpack content and msgpack loads json content
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3526 +/- ##
==========================================
- Coverage 85.20% 85.09% -0.12%
==========================================
Files 115 115
Lines 11768 11800 +32
Branches 2591 1935 -656
==========================================
+ Hits 10027 10041 +14
- Misses 1190 1205 +15
- Partials 551 554 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…with data dumped by msgpack
* feat: move msgpack to option deps * Add fragment to news/ * refactor: use classmethod * refactor: mock json as msgpack * chore: upgrade deps * ci: add tests without msgpack * refactor: forward and backward compatibility * tests: check compatibility for json and msgpack * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * refactor: return none instead of raises exception when loads by json with data dumped by msgpack --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Pull Request Checklist
news/
describing what is new.Describe what you have changed in this PR.
Fixes #3485
It is better to make 'msgpack' as optional dependency.