-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-99631: Add custom loads and dumps support for the shelve module #118065
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
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
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.
BsdDbShelf
still uses pickle.Unpickler
directly to walk the keys.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@@ -160,18 +181,20 @@ Restrictions | |||
modules. The *dict* object passed to the constructor must support those | |||
methods. This is generally accomplished by calling one of | |||
:func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The |
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.
By the way, we also need to update this sentence (from bsddb
to berkeleydb
). bsddb
is deprecated according to https://www.jcea.es/programacion/pybsddb.htm.
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.
It looks like the change would be bigger: it’s a new module (although the docs are not very clear) with maybe a new API.
Updating or deprecating this should be discussed in its own ticket 🙂
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.
Yes, I agree on it. It would be better to open a new ticket to discuss this issue.
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.
... or consider instead opening topic on Discourse; this may need a larger audience than what you'd get on the bug tracker.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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.
Thank you for the changes, those are much clearer now! I don't have any other comments (by the way, thank you for being reactive and accepting my feedback!)
I'll let a core dev check other stuff (I've stared too much at that PR so it's better if there is a fresh eye for confirmation).
You're welcome. Thank you so much for your time and effort. |
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.
Some few nitpicks that I thought of. Some should be addressed (3.15 -> next + self.subTest(proto=5)`, while others are purely cosmetics.
I'll let a core dev check other stuff (
This core dev is now me.
modified: Doc/library/shelve.rst
…t_missing_custom_serializer
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.
Almost done!
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--118065.org.readthedocs.build/