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

trace module crashes due to using wrong sort idiom #46858

Closed
mark-summerfield mannequin opened this issue Apr 10, 2008 · 3 comments
Closed

trace module crashes due to using wrong sort idiom #46858

mark-summerfield mannequin opened this issue Apr 10, 2008 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@mark-summerfield
Copy link
Mannequin

mark-summerfield mannequin commented Apr 10, 2008

BPO 2606
Nosy @loewis, @mark-summerfield
Files
  • issue_2606.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 = None
    closed_at = <Date 2008-04-10.19:03:06.790>
    created_at = <Date 2008-04-10.12:19:16.460>
    labels = ['type-bug', 'library']
    title = 'trace module crashes due to using wrong sort idiom'
    updated_at = <Date 2008-04-10.19:03:06.775>
    user = 'https://github.com/mark-summerfield'

    bugs.python.org fields:

    activity = <Date 2008-04-10.19:03:06.775>
    actor = 'loewis'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-04-10.19:03:06.790>
    closer = 'loewis'
    components = ['Library (Lib)']
    creation = <Date 2008-04-10.12:19:16.460>
    creator = 'mark'
    dependencies = []
    files = ['9996']
    hgrepos = []
    issue_num = 2606
    keywords = ['patch']
    message_count = 3.0
    messages = ['65290', '65294', '65308']
    nosy_count = 3.0
    nosy_names = ['loewis', 'mark', 'gpolo']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2606'
    versions = ['Python 3.0']

    @mark-summerfield
    Copy link
    Mannequin Author

    mark-summerfield mannequin commented Apr 10, 2008

    In Py30a4's trace.py there is this:

        calls = self.calledfuncs.keys()
        calls.sort()

    which causes:
    AttributeError: 'dict_keys' object has no attribute 'sort'

    There are two other occurrences of this idiom in trace.py (just search
    for ".sort"). I guess they should be easy to fix.

    @mark-summerfield mark-summerfield mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Apr 10, 2008
    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented Apr 10, 2008

    I've changed them to sorted(obj.keys())

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 10, 2008

    I've further simplified the code by eliminating the local variables, and
    committed that as r62270.

    @loewis loewis mannequin closed this as completed Apr 10, 2008
    @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

    0 participants