[issue39426] Pickler docstring misstates default and highest protocols
New submission from Mark Dickinson <dickinsm@gmail.com>:
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. ---------- assignee: docs@python components: Documentation messages: 360497 nosy: docs@python, mark.dickinson, pitrou priority: normal severity: normal status: open title: Pickler docstring misstates default and highest protocols versions: Python 3.8, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Antoine Pitrou <pitrou@free.fr> added the comment: Good catch. Do you want to submit a PR? ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Mark Dickinson <dickinsm@gmail.com> added the comment:
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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Change by Mark Dickinson <dickinsm@gmail.com>: ---------- assignee: docs@python -> mark.dickinson _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Change by Mark Dickinson <dickinsm@gmail.com>: ---------- keywords: +patch pull_requests: +17540 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18154 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: 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/e9652e8d58392f5022759ba06b444ce970e... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +17549 pull_request: https://github.com/python/cpython/pull/18162 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: 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/a46728a570e30e88df253eab17ad6c4372a... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
Change by Antoine Pitrou <pitrou@free.fr>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39426> _______________________________________
participants (3)
-
Antoine Pitrou
-
Mark Dickinson
-
miss-islington