-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-99631: Add custom loads and dumps support for the shelve module #99632
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
Could you add docs and tests? |
Do we need to specify the pickler and unpickler classes or just |
I'd also go for |
Doc and test have been added. @merwok The pickler and unpickler classes have been replaced with |
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.
Thanks a lot for your efforts @furkanonder, I have a few minor suggestions but this already looks great!
✅ Deploy Preview for python-cpython-preview canceled.
|
Should we require the serializer to accept the pickle protocol? It does not make sense for other than pickle formats. What happens if only serializer or only deserializer are passed? |
elif (serializer is None and deserializer is not None) or (deserializer is None and serializer is not None):
raise ShelveError("Serializer and deserializer must be defined together.") In this case, shelve raises an error. |
This seems to have been forgotten over end-of-year break in 2022. Do you want to revive it? The |
I accidentally deleted my forked repository, so I can't update my old PRs. So I opened a new PR. |
Uh oh!
There was an error while loading. Please reload this page.