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

Fix OrderedDict.__sizeof__ #70102

Closed
serhiy-storchaka opened this issue Dec 20, 2015 · 3 comments
Closed

Fix OrderedDict.__sizeof__ #70102

serhiy-storchaka opened this issue Dec 20, 2015 · 3 comments
Assignees
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 25914
Nosy @loewis, @rhettinger, @ericsnowcurrently, @serhiy-storchaka
Files
  • odict_sizeof.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 2015-12-22.06:24:20.680>
    created_at = <Date 2015-12-20.08:52:19.727>
    labels = ['extension-modules', 'type-bug']
    title = 'Fix OrderedDict.__sizeof__'
    updated_at = <Date 2015-12-22.06:24:20.679>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2015-12-22.06:24:20.679>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-12-22.06:24:20.680>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2015-12-20.08:52:19.727>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['41367']
    hgrepos = []
    issue_num = 25914
    keywords = ['patch']
    message_count = 3.0
    messages = ['256754', '256814', '256827']
    nosy_count = 5.0
    nosy_names = ['loewis', 'rhettinger', 'python-dev', 'eric.snow', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25914'
    versions = ['Python 3.5', 'Python 3.6']

    @serhiy-storchaka
    Copy link
    Member Author

    Proposed patch correctly calculates the size of OrderedDict (the size of an instance dict should not be counted) and adds exact tests for sizeof.

    @serhiy-storchaka serhiy-storchaka added extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Dec 20, 2015
    @ericsnowcurrently
    Copy link
    Member

    LGTM

    Thanks for doing that. It's definitely cleaner. :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 22, 2015

    New changeset 0a2ea08fcebe by Serhiy Storchaka in branch '3.5':
    Issue bpo-25914: Fixed and simplified OrderedDict.__sizeof__.
    https://hg.python.org/cpython/rev/0a2ea08fcebe

    New changeset 624316fbb39d by Serhiy Storchaka in branch 'default':
    Issue bpo-25914: Fixed and simplified OrderedDict.__sizeof__.
    https://hg.python.org/cpython/rev/624316fbb39d

    @serhiy-storchaka serhiy-storchaka self-assigned this Dec 22, 2015
    @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
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants