Skip to content

Shelve should default to the default Pickle protocol instead of hardcoding version 3 #86237

Description

@marco-c
mannequin
BPO 42071
Nosy @rhettinger, @ZackerySpytz, @marco-c
PRs
  • bpo-34204: Make the shelve library use Pickle's default protocol version instead of defaulting to version 3 #22751
  • Superseder
  • bpo-34204: Bump the default pickle protocol in shelve
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-10-18.19:08:59.829>
    created_at = <Date 2020-10-18.18:58:45.208>
    labels = ['type-feature', 'library', '3.10']
    title = 'Shelve should default to the default Pickle protocol instead of hardcoding version 3'
    updated_at = <Date 2020-10-18.19:10:43.614>
    user = 'https://github.com/marco-c'

    bugs.python.org fields:

    activity = <Date 2020-10-18.19:10:43.614>
    actor = 'rhettinger'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-10-18.19:08:59.829>
    closer = 'ZackerySpytz'
    components = ['Library (Lib)']
    creation = <Date 2020-10-18.18:58:45.208>
    creator = 'marco-c'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42071
    keywords = ['patch']
    message_count = 3.0
    messages = ['378885', '378887', '378888']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'ZackerySpytz', 'marco-c']
    pr_nums = ['22751']
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '34204'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue42071'
    versions = ['Python 3.10']

    Activity

    1. marco-c commented on Oct 18, 2020

      marco-cmannequin
      MannequinAuthor

      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 shelve.open or the Shelf constructor.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Oct 18, 2020
    3. ZackerySpytz commented on Oct 18, 2020

      ZackerySpytzmannequin
      Mannequin

      Unfortunately, this is a duplicate of bpo-34204 (which already has a pull request).

    4. rhettinger commented on Oct 18, 2020

      @rhettinger
      Contributor

      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.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions