Skip to content

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

Open
wants to merge 74 commits into
base: main
Choose a base branch
from

Conversation

furkanonder
Copy link
Contributor

@furkanonder furkanonder commented Apr 18, 2024

Copy link
Member

@encukou encukou left a 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.

@bedevere-app
Copy link

bedevere-app bot commented Apr 23, 2024

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@@ -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
Copy link
Contributor Author

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.

Copy link
Member

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 🙂

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Member

@picnixz picnixz left a 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).

@furkanonder
Copy link
Contributor Author

furkanonder commented Jul 29, 2024

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!)

You're welcome. Thank you so much for your time and effort.

@furkanonder furkanonder added awaiting review and removed 3.14 bugs and security fixes awaiting changes labels Sep 13, 2024
Copy link
Member

@picnixz picnixz left a 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.

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost done!

furkanonder and others added 4 commits June 2, 2025 20:05
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stdlib Python modules in the Lib dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants