Skip to content

merge pickle and cPickle in 3.0 #47166

Closed
Closed

Description

@brettcannon
BPO 2917
Nosy @brettcannon, @kbkaiser, @giampaolo, @avassalotti, @benjaminp
Files
  • _pickle.c
  • changeset-1.diff
  • changeset-2.diff
  • add-cpickle-1.patch
  • add-cpickle-2.patch
  • fix_pickle_int64.diff
  • 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 = 'https://github.com/avassalotti'
    closed_at = <Date 2008-06-13.02:50:24.552>
    created_at = <Date 2008-05-19.19:59:20.993>
    labels = ['type-bug', 'library']
    title = 'merge pickle and cPickle in 3.0'
    updated_at = <Date 2008-06-13.02:50:24.551>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2008-06-13.02:50:24.551>
    actor = 'alexandre.vassalotti'
    assignee = 'alexandre.vassalotti'
    closed = True
    closed_date = <Date 2008-06-13.02:50:24.552>
    closer = 'alexandre.vassalotti'
    components = ['Library (Lib)']
    creation = <Date 2008-05-19.19:59:20.993>
    creator = 'brett.cannon'
    dependencies = []
    files = ['10501', '10519', '10566', '10567', '10592', '10601']
    hgrepos = []
    issue_num = 2917
    keywords = ['patch']
    message_count = 9.0
    messages = ['67071', '67629', '67695', '67882', '68027', '68034', '68049', '68071', '68119']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'kbk', 'giampaolo.rodola', 'alexandre.vassalotti', 'benjamin.peterson']
    pr_nums = []
    priority = 'critical'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2917'
    versions = ['Python 3.0']

    Activity

    1. brettcannon commented on May 19, 2008

      @brettcannon
      MemberAuthor

      cPickle should be gone in 3.0 and pickle should have an accelerated
      version behind it, when available.

      Alexandre has been working on this (might even be checked in), so
      assigning to him to help track for PEP-3108 work.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on May 19, 2008
    3. avassalotti commented on Jun 2, 2008

      @avassalotti
      Member

      Here is the fully reviewed and shiny C optimized pickle module. :-)

      Note, I am only posting the _pickle.c source code for now. I still need
      to work out a few details out. For example, there is a few methods that
      needs to be exposed in the public API -- i.e., Unpickler.find_class()
      and Pickler.save_reduce(). Also, instantiate() needs to reworked to
      match the one in pickle.py. Anyway, I am now pretty confident that I
      will have the time to finalize these details before the beta.

    4. avassalotti commented on Jun 4, 2008

      @avassalotti
      Member

      Here is a diff against the previously posted _pickle.c module. The
      module is pretty much done now. I fixed find_class() to be a proper
      method and move the initialization code of Pickler/Unpickler into the
      tp_init slot to allow proper subclassing.

      The only things I didn't do is make save_reduce() public (since it would
      be useless) and fix instantiate() to be exactly the same as in pickle.py
      (since I have no idea how to cleanly inject a __class__ attribute into a
      pre-build empty class from C).

      With the beta postponed, I will probably add some optimizations to the
      module and update the stdlib documentation.

    5. avassalotti commented on Jun 10, 2008

      @avassalotti
      Member

      Here is the full patch that adds the _pickle module. I would like to
      commit it as soon another developer tests it and (hopefully) reviews it.

      A documentation patch is coming as well. However since I don't want to
      block the release just for documentation patch, I will post it as a
      separate issue.

    6. avassalotti commented on Jun 11, 2008

      @avassalotti
      Member

      I updated the patch to use the new module framework.

    7. avassalotti commented on Jun 11, 2008

      @avassalotti
      Member

      Committed in r64152.

    8. benjaminp commented on Jun 12, 2008

      @benjaminp
      Contributor

      I'm sorry. I had to revert this.

    9. avassalotti commented on Jun 12, 2008

      @avassalotti
      Member

      Okay, I fixed _pickle's integers unpickling on 64bit platforms. Here is
      the patch.

    10. avassalotti commented on Jun 13, 2008

      @avassalotti
      Member

      Restored _pickle in r64180.

    11. 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

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions