This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Pickler docstring misstates default and highest protocols
Type: Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: docs@python, mark.dickinson, miss-islington, pitrou
Priority: normal Keywords: patch

Created on 2020-01-22 18:40 by mark.dickinson, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18154 merged mark.dickinson, 2020-01-23 20:19
PR 18162 merged miss-islington, 2020-01-24 10:03
Messages (5)
msg360497 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-01-22 18:40
From the pickle.Pickler docstring:

> The optional *protocol* argument tells the pickler to use the given
> protocol; supported protocols are 0, 1, 2, 3 and 4.  The default
> protocol is 3; a backward-incompatible protocol designed for Python 3.

That's out of date since Python 3.8, where the default protocol is 4 and the highest available is 5. For future-proofing, it may be worth rewording the docstring to refer directly to the DEFAULT_PROTOCOL and HIGHEST_PROTOCOL constants.
msg360498 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2020-01-22 18:42
Good catch.  Do you want to submit a PR?
msg360499 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-01-22 18:57
> Do you want to submit a PR?

Not immediately. I'll add it to my to-do list, but definitely won't complain if someone else gets there first.
msg360602 - (view) Author: miss-islington (miss-islington) Date: 2020-01-24 10:03
New changeset e9652e8d58392f5022759ba06b444ce970eb12db by Miss Islington (bot) (Mark Dickinson) in branch 'master':
bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)
https://github.com/python/cpython/commit/e9652e8d58392f5022759ba06b444ce970eb12db
msg360603 - (view) Author: miss-islington (miss-islington) Date: 2020-01-24 10:20
New changeset a46728a570e30e88df253eab17ad6c4372a422da by Miss Islington (bot) in branch '3.8':
bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)
https://github.com/python/cpython/commit/a46728a570e30e88df253eab17ad6c4372a422da
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83607
2020-01-24 10:23:02pitrousetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-01-24 10:20:38miss-islingtonsetmessages: + msg360603
2020-01-24 10:03:45miss-islingtonsetpull_requests: + pull_request17549
2020-01-24 10:03:26miss-islingtonsetnosy: + miss-islington
messages: + msg360602
2020-01-23 20:19:06mark.dickinsonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17540
2020-01-22 18:57:51mark.dickinsonsetassignee: docs@python -> mark.dickinson
2020-01-22 18:57:28mark.dickinsonsetmessages: + msg360499
2020-01-22 18:42:40pitrousetmessages: + msg360498
2020-01-22 18:40:01mark.dickinsoncreate