Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marco-c mannequin opened this issue Oct 18, 2020 · 3 comments
Closed

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

marco-c mannequin opened this issue Oct 18, 2020 · 3 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@marco-c
Copy link
Mannequin

marco-c mannequin commented Oct 18, 2020

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']

    @marco-c
    Copy link
    Mannequin Author

    marco-c mannequin commented Oct 18, 2020

    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.

    @marco-c marco-c mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 18, 2020
    @ZackerySpytz
    Copy link
    Mannequin

    ZackerySpytz mannequin commented Oct 18, 2020

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

    @ZackerySpytz ZackerySpytz mannequin removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Oct 18, 2020
    @ZackerySpytz ZackerySpytz mannequin closed this as completed Oct 18, 2020
    @rhettinger
    Copy link
    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant