-
-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
bpo-35933: Document/fix case when __getstate__ returns a tuple of 2 dictionnaries #11955
bpo-35933: Document/fix case when __getstate__ returns a tuple of 2 dictionnaries #11955
Conversation
Could you change the description of your PR because bedevere can't find the right associated issue.
Thank you |
@@ -6233,7 +6233,7 @@ load_build(UnpicklerObject *self) | |||
slotstate = NULL; | |||
|
|||
/* Set inst.__dict__ from the state dict (if any). */ | |||
if (state != Py_None) { | |||
if (PyObject_IsTrue(state)) { |
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.
Any reason you're changing this?
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.
Consistency with pickle.py
.
But this PR documents an implementation detail and makes a quasi-non significant change, so feel free to close it.
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.
If you say so :-) I'm closing now.
bpo-35933: Document/fix case when getstate returns a tuple of 2 dictionnaries
test_descr.py
already tests this functionality pretty thoroughly._pickle.c
is simply for the sake of consistency betweenpickle.py
and_pickle.c
https://bugs.python.org/issue35933