Skip to content
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

Closed

Conversation

pierreglaser
Copy link
Contributor

@pierreglaser pierreglaser commented Feb 20, 2019

bpo-35933: Document/fix case when getstate returns a tuple of 2 dictionnaries

  • test_descr.py already tests this functionality pretty thoroughly.
  • the change in _pickle.c is simply for the sake of consistency between pickle.py and _pickle.c

https://bugs.python.org/issue35933

Doc/library/pickle.rst Outdated Show resolved Hide resolved
@matrixise
Copy link
Member

matrixise commented Feb 20, 2019

Could you change the description of your PR because bedevere can't find the right associated issue.
just

[bpo-35933](https://bugs.python.org/issue35933): Document/fix case when __getstate__ returns a tuple of 2 dictionnaries

Thank you

@pierreglaser pierreglaser changed the title bpo-35933: Document/fix case when __getstate__ returns a tuple of 2 dictionaries [bpo-35933](https://bugs.python.org/issue35933): Document/fix case when __getstate__ returns a tuple of 2 dictionnaries Feb 22, 2019
@pierreglaser pierreglaser changed the title [bpo-35933](https://bugs.python.org/issue35933): Document/fix case when __getstate__ returns a tuple of 2 dictionnaries bpo-35933: Document/fix case when __getstate__ returns a tuple of 2 dictionnaries Feb 22, 2019
@@ -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)) {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@pitrou pitrou closed this May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants