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

Correct __sizeof__ support for pickle #59718

Closed
serhiy-storchaka opened this issue Jul 31, 2012 · 8 comments
Closed

Correct __sizeof__ support for pickle #59718

serhiy-storchaka opened this issue Jul 31, 2012 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 15513
Nosy @jcea, @pitrou, @avassalotti, @serhiy-storchaka
Files
  • pickle_sizeof-3.3.patch: Patch for 3.3
  • pickle_sizeof-3.4.patch
  • 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/serhiy-storchaka'
    closed_at = <Date 2014-12-17.09:44:53.174>
    created_at = <Date 2012-07-31.08:35:39.108>
    labels = ['type-bug', 'library']
    title = 'Correct __sizeof__ support for pickle'
    updated_at = <Date 2014-12-17.09:44:53.173>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2014-12-17.09:44:53.173>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2014-12-17.09:44:53.174>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2012-07-31.08:35:39.108>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['26615', '36415']
    hgrepos = []
    issue_num = 15513
    keywords = ['patch', 'needs review']
    message_count = 8.0
    messages = ['166979', '167053', '167329', '171978', '225533', '226409', '232661', '232750']
    nosy_count = 6.0
    nosy_names = ['jcea', 'pitrou', 'alexandre.vassalotti', 'python-dev', 'aliles', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15513'
    versions = ['Python 3.4', 'Python 3.5']

    @serhiy-storchaka
    Copy link
    Member Author

    Here is a patch that implements correct __sizeof__ for Pickler and Unpickler in pickler module.

    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 31, 2012
    @avassalotti
    Copy link
    Member

    I reviewed the patch here

    http://bugs.python.org/review/15513/#ps5596

    @serhiy-storchaka
    Copy link
    Member Author

    In any case do not commit the patch for the time being. Probably it should be improved to include the size of the internal Python objects (see discussion in bpo-15490).

    @serhiy-storchaka serhiy-storchaka self-assigned this Aug 5, 2012
    @serhiy-storchaka
    Copy link
    Member Author

    Updated patches will be more complex and will depend on functions added in the patches for bpo-15490. So I'm waiting for the final adoption of the patches for bpo-15490.

    @serhiy-storchaka
    Copy link
    Member Author

    Required patch is already committed. Here is updated patch.

    @serhiy-storchaka
    Copy link
    Member Author

    If there are no objections I'll commit the patch soon.

    @serhiy-storchaka
    Copy link
    Member Author

    Ping.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 16, 2014

    New changeset fed774c926f5 by Serhiy Storchaka in branch '3.4':
    Issue bpo-15513: Added a __sizeof__ implementation for pickle classes.
    https://hg.python.org/cpython/rev/fed774c926f5

    New changeset e11d99ed3d3f by Serhiy Storchaka in branch 'default':
    Issue bpo-15513: Added a __sizeof__ implementation for pickle classes.
    https://hg.python.org/cpython/rev/e11d99ed3d3f

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants