◐ Shell
reader mode source ↗
Skip to content

bpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4#6355

Merged
ambv merged 1 commit into
python:masterfrom
ambv:pickle4
Apr 4, 2018
Merged

bpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4#6355
ambv merged 1 commit into
python:masterfrom
ambv:pickle4

Conversation

@ambv

@ambv ambv commented Apr 2, 2018

Copy link
Copy Markdown
Contributor

This makes performance better and produces shorter pickles. This change is backwards compatible up to the oldest currently supported version of Python (3.4).

https://bugs.python.org/issue23403

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Please update docstrings, the module documentation, and What's New.

@ambv

ambv commented Apr 3, 2018

Copy link
Copy Markdown
Contributor Author

Lib/test/pickletester.py:AbstractPicklerUnpicklerObjectTests.test_clear_pickler_memo is failing for CPicklerUnpicklerObjectTests only. This seems like a bug to me since it passes on the same protocol in the pure-Python implementation (PyPicklerUnpicklerObjectTests).

@pitrou Could you take a look?

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

There is other mention of the default protocol 3 in the module documentation.

Regenerate Argument Clinic files and fix tests.

@ambv

ambv commented Apr 3, 2018

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka, updated the remaining comment on default protocol 3, regenerated Argument Clinic. For the failing test, see my comment above, I'm not sure what the fix should be here.

@serhiy-storchaka

Copy link
Copy Markdown
Member

I think there is a bug in C implementation. Opened bpo-33209.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

And maybe add a versionchanged directive somewhere in pickle.rst?

This makes performance better and produces shorter pickles. This change is backwards compatible up to the oldest currently supported version of Python (3.4).
@ambv

ambv commented Apr 3, 2018

Copy link
Copy Markdown
Contributor Author

Responded to remaining nits and rebased to include GH-6363. All tests pass now.

@ambv ambv merged commit c51d8c9 into python:master Apr 4, 2018
@bedevere-bot

Copy link
Copy Markdown

@ambv: Please replace # with GH- in the commit message next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants