-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
base: main
Are you sure you want to change the base?
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 ReportAttention: 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:
|
src/pdm/models/serializers.py
Outdated
# For compatibility: loaded by json, while data was dumped by MsgPack | ||
raise PdmException( | ||
"You are trying to load cache that was previous dumped by MsgPack." | ||
'Install it by `pip install "pdm[msgpack]"` then try again, or remove ' |
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.
'Install it by `pip install "pdm[msgpack]"` then try again, or remove ' | |
'Install it by `pdm self add msgpack` then try again, or remove ' |
…with data dumped by msgpack
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.