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.

Title: Shelve should default to the default Pickle protocol instead of hardcoding version 3
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: duplicate
Dependencies: Superseder: Bump the default pickle protocol in shelve
View: 34204
Assigned To: Nosy List: ZackerySpytz, marco-c, rhettinger
Priority: normal Keywords: patch

Created on 2020-10-18 18:58 by marco-c, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 22751 open marco-c, 2020-10-18 19:01
Messages (3)
msg378885 - (view) Author: Marco Castelluccio (marco-c) * Date: 2020-10-18 18:58
Shelve is currently defaulting to Pickle protocol 3, instead of using Pickle's default protocol for the Python version in use.

This way, Shelve's users don't benefit from improvements introduced in newer Pickle protocols, unless they notice it and manually pass a newer protocol version to or the Shelf constructor.
msg378887 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2020-10-18 19:08
Unfortunately, this is a duplicate of bpo-34204 (which already has a pull request).
msg378888 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-10-18 19:10
This seems reasonable to me.

There might be some issue is existing code where different versions of Python are sharing the same shelf, but I don't think this is common.
Date User Action Args
2022-04-11 14:59:36adminsetgithub: 86237
2020-10-18 19:10:43rhettingersetnosy: + rhettinger
messages: + msg378888
2020-10-18 19:08:59ZackerySpytzsetstatus: open -> closed

superseder: Bump the default pickle protocol in shelve
versions: - Python 3.6, Python 3.7, Python 3.8, Python 3.9
nosy: + ZackerySpytz

messages: + msg378887
resolution: duplicate
stage: patch review -> resolved
2020-10-18 19:01:44marco-csetkeywords: + patch
stage: patch review
pull_requests: + pull_request21713
2020-10-18 18:58:45marco-ccreate