Skip to content

Dis module doesn't know how to disassemble generators #66146

Closed

Description

@httpsgithubcomhakril
BPO 21947
Nosy @rhettinger, @ncoghlan, @pitrou, @vstinner, @https://github.com/hakril
Files
  • dis_generator.patch: patch for Lib/dis.py for generator disassembling
  • dis_generator2.patch: patch with unit test and doc update
  • dis_generator3.patch: Updated the docstrings of modified functions
  • 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 2014-07-25.13:09:09.277>
    created_at = <Date 2014-07-09.14:28:29.287>
    labels = ['extension-modules', 'type-feature']
    title = "`Dis` module doesn't know how to disassemble generators"
    updated_at = <Date 2014-07-25.13:09:09.277>
    user = 'https://github.com/httpsgithubcomhakril'

    bugs.python.org fields:

    activity = <Date 2014-07-25.13:09:09.277>
    actor = 'ncoghlan'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-07-25.13:09:09.277>
    closer = 'ncoghlan'
    components = ['Extension Modules']
    creation = <Date 2014-07-09.14:28:29.287>
    creator = 'hakril'
    dependencies = []
    files = ['35914', '35918', '35954']
    hgrepos = []
    issue_num = 21947
    keywords = ['patch']
    message_count = 7.0
    messages = ['222619', '222637', '222642', '222650', '223030', '223943', '223944']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'ncoghlan', 'pitrou', 'vstinner', 'python-dev', 'hakril']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21947'
    versions = ['Python 3.5']

    Activity

    1. httpsgithubcomhakril commented on Jul 9, 2014

      httpsgithubcomhakrilmannequin
      MannequinAuthor

      The dis module doesn't know how to disassemble generator object because it has no idea about the gi_code attribute.
      I made a (very) little patch to change this behavior.

      If there is a valid reason to not let the dis module disassemble generator, I would be glad to know it.

    2. added
      extension-modules
      type-feature
      on Jul 9, 2014
    3. pitrou commented on Jul 9, 2014

      @pitrou
      Member

      That sounds like a good idea. The patch lacks a unit test, though.

    4. httpsgithubcomhakril commented on Jul 9, 2014

      httpsgithubcomhakrilmannequin
      MannequinAuthor

      Here is a try for a better patch.
      Added a unit test and updated the doc.

    5. rhettinger commented on Jul 10, 2014

      @rhettinger
      Contributor

      +1

    6. httpsgithubcomhakril commented on Jul 14, 2014

      httpsgithubcomhakrilmannequin
      MannequinAuthor

      Updated some docstrings in the new patch after the review comments.
      Thanks kushou for the code review.

    7. python-dev commented on Jul 25, 2014

      python-devmannequin
      Mannequin

      New changeset 2ae5709692ef by Nick Coghlan in branch 'default':
      Issue bpo-21947: handle generator-iterator objects in dis
      http://hg.python.org/cpython/rev/2ae5709692ef

    8. ncoghlan commented on Jul 25, 2014

      @ncoghlan
      Contributor

      Thanks for the patch Clement!

      Could I also please request that you sign the Contributor License Agreement at https://www.python.org/psf/contrib/contrib-form/

      While we have some discretion to accept "small" patches without one, a signed CLA helps assure that we have the necessary rights to incorporate and redistribute contributions worldwide.

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

    No one assigned

      Labels

      extension-modulestype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions