-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-35900: Add a state_setter arg to save_reduce #12588
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
pitrou
merged 29 commits into
python:master
from
pierreglaser:give-a-state-setter-to-save-reduce
May 8, 2019
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ddce7cb
ENH add a state_setter arg to save_reduce
pierreglaser cf86a19
MNT News section
pierreglaser 9077859
TST test custom reducer using with state_setter
pierreglaser b388aa0
DOC mention state_setter in pickle docs
pierreglaser 1f286c1
CLN do not expose slotstate in state_setter
pierreglaser 8abbef1
DOC update the doc according to the last commit
pierreglaser 4b46841
CLN load_build cleanups
pierreglaser 6c2c957
CLN do not mention protocol 5
pierreglaser d7f8714
CLN style
pierreglaser d253441
CLN style and comments
pierreglaser 48e4686
DOC update doc
pierreglaser e83f940
CLN typo
pierreglaser 83d3a2b
MNT dont pervert BUILD if state_setter is specified
pierreglaser 68b3a5d
CLN style
pierreglaser f311ef6
ENH pop state_setter's output of the pickler stack
pierreglaser 744525e
DOC write code explanation comments
pierreglaser a2687d3
CLN spurious line deletion
pierreglaser 1dadb11
CLN remove stale state_setter handling in load_build
pierreglaser ab3cef2
ENH implement the same mechanism in pickle.py
pierreglaser 3fd958b
CLN little refactoring of pickle.py (comment + style)
pierreglaser 785c067
MNT versionadded directive
pierreglaser bb2882a
Fix typo
ncoghlan c0ea035
Fix copy-and-paste issue in error message
ncoghlan 4450b7b
Fix reduce result length checking error message
ncoghlan c781103
DOC rephrasings
pierreglaser 5404bcd
DOC comments
pierreglaser 88d19c0
TST test priority of state_setter over __setstate__
pierreglaser 183f2b0
TST, CLN remove unnecessary instance recreation
pierreglaser 3f2fdb2
FIX allow state_setter to be an arbitrary callable
pierreglaser 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
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
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2019-03-27-15-09-00.bpo-35900.fh56UU.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Allow reduction methods to return a 6-item tuple where the 6th item specifies a | ||
custom state-setting method that's called instead of the regular | ||
``__setstate__`` method. |
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
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.
Uh oh!
There was an error while loading. Please reload this page.