-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Merged
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
e269c09
Use custom loads & dumps instead of custom pickler & unpickler for Shelf
furkanonder 3465149
Allow custom loads & dumps instead of custom pickler & unpickler for …
furkanonder 44b9fa1
Update documentation for serializer and deserializred functions
furkanonder f2eed32
Update Doc/library/shelve.rst
furkanonder b3e5723
Update Doc/library/shelve.rst
furkanonder 53d5557
Update documentation for serializer and deserializer functions
furkanonder d496eab
Merge branch 'main' into issue-99631-2
furkanonder 1e295ba
Fix lines according to PEP-8
furkanonder 2011baa
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 3cbabe9
Fix doc according to line 80
furkanonder 67b7340
Merge branch 'main' into issue-99631-2
furkanonder c6b43e2
Fix inline emphasis issue in docs
furkanonder 52a90f7
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 4f79cf6
Update the definition of the open function.
furkanonder 798fdb2
Pass the serializer and serializer arguments of Shelf.__init__ of Bsd…
furkanonder bb1150d
Add unittests for BsdDbShelf
furkanonder 98d841b
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 1159bb6
Update BsdDbShelf's set_location, last and first functions
furkanonder 4b4f1b6
Update BsdDbShelf's next and previous functions
furkanonder bc399fa
Merge branch 'main' into issue-99631-2
furkanonder 41448d3
Refer to shelve.open function for the deserializer and serializer arg…
furkanonder fbbe5ea
Refer to shelve.open function for the deserializer and serializer arg…
furkanonder fdd3e8e
Merge branch 'main' into issue-99631-2
furkanonder 6823ef2
📜🤖 Added by blurb_it.
blurb-it[bot] 2affece
Update the versionchanged statements
furkanonder da8bc91
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 6bfebee
change type of num2
furkanonder 82d58a7
Add test_custom_incomplete_serializer_and_deserializer case
furkanonder 7dca8b4
Merge branch 'main' into issue-99631-2
furkanonder 5f97676
Specify that the Shelf, DbfilenameShelf and BsdDbShelf class's takes …
furkanonder 048daee
And and update the versionchanged's text
furkanonder 00837d0
Update the news entry
furkanonder 1292963
Update the versionchanged's text
furkanonder 3431920
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 97a6d7c
Add new testcases to other bytes objects
furkanonder 3becbc8
Add new testcases to test custom serializer protocl
furkanonder 3a5d6ed
Add new testcases to other bytes objects
furkanonder fb74832
Delete comma from document
furkanonder d670c95
Update the description of open function
furkanonder f2e22eb
sort the imports
furkanonder e00a52f
add white space
furkanonder 3af3f97
Don't use f-string in type(obj).__name__
furkanonder 9d232e5
Don't use f-string in type(obj).__name__
furkanonder 26fc959
Don't use f-string in type(obj).__name__
furkanonder ab005aa
Set shelve class argument only serializer and deserializer
furkanonder 6052309
Update shelveError message
furkanonder 87b66d5
pass serializer and deserializer as keyword argument to DbfilenameShelf
furkanonder 0c2f255
Remove unused import
furkanonder 3db0c8e
Update shelve testcases
furkanonder 5c39d94
Remove memoryview testcases
furkanonder 1ca1801
Add ShelveError to shelve's __all__
furkanonder 5a42de1
Add ShelveError to shelve documentation
furkanonder b0a5ee3
Add blank lines after versionadded and versionchanged
furkanonder 4202ede
Remove white space in test_shelve
furkanonder 2827eb4
Add test_custom_incomplete_serializer_and_deserializer_bsd_db_shelf
furkanonder 9918531
Merge branch 'issue-99631-2' of github.com:furkanonder/cpython into i…
furkanonder 54188bd
Update the serializer and deserializer functions
furkanonder 786a248
Move os.mkdir and addCleanup functions beginning of the testcases
furkanonder 20c2450
Use self.assertIsNone when checking None types
furkanonder b3770ae
change the test order
furkanonder 588623a
Merge branch 'main' into issue-99631-2
furkanonder 4d9599b
Update shelve module version references from 3.14 to 3.15
furkanonder 9b204b7
Merge branch 'main' into issue-99631-2
furkanonder 8b06918
Change shelve module version references from 3.15 to next
furkanonder b0f0bbc
Change shelve module version references from 3.15 to next
furkanonder d1bb227
refactor nested context managers for better readability
furkanonder 791743b
simplify assertRaises calls in test_missing_custom_deserializer & tes…
furkanonder 6b4be8b
refactor nested context managers for better readability
furkanonder 34a32b9
Add type_name_len helper and use shorter variable names to reduce lin…
furkanonder bf6f3aa
Merge branch 'main' into issue-99631-2
furkanonder 4b000cd
Improve the description of the open function
furkanonder 2dcda2a
Update the description of ShelveError
furkanonder 00bfb01
Simplify conditional branches in serializer and deserializer functions
furkanonder 23ea842
Merge branch 'main' into issue-99631-2
furkanonder 4df9b58
Merge branch 'main' into issue-99631-2
furkanonder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
toberkeleydb
).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.