Skip to content

inspect.getfile should raise a TypeError if C object does not have __module__ #64571

Closed

Description

@1st1
BPO 20372
Nosy @ncoghlan, @serhiy-storchaka, @1st1
Files
  • getfile_patch_01.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 = None
    closed_at = <Date 2014-01-27.18:36:03.813>
    created_at = <Date 2014-01-23.20:26:09.887>
    labels = []
    title = 'inspect.getfile should raise a TypeError if C object does not have __module__'
    updated_at = <Date 2014-01-27.22:30:40.882>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2014-01-27.22:30:40.882>
    actor = 'yselivanov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-01-27.18:36:03.813>
    closer = 'yselivanov'
    components = []
    creation = <Date 2014-01-23.20:26:09.887>
    creator = 'yselivanov'
    dependencies = []
    files = ['33667']
    hgrepos = []
    issue_num = 20372
    keywords = ['patch']
    message_count = 2.0
    messages = ['208988', '209458']
    nosy_count = 4.0
    nosy_names = ['ncoghlan', 'python-dev', 'serhiy.storchaka', 'yselivanov']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue20372'
    versions = []

    Activity

    1. 1st1 commented on Jan 23, 2014

      @1st1
      MemberAuthor

      I'm not sure if it is right to fix the inspect module, instead of making all C objects to have the '__module__' attribute (is it even possible?), but if it is, the patch is attached.

    2. python-dev commented on Jan 27, 2014

      python-devmannequin
      Mannequin

      New changeset 50706164c38f by Yury Selivanov in branch 'default':
      inspect.getfile: Don't crash on classes without '__module__' attribute bpo-20372
      http://hg.python.org/cpython/rev/50706164c38f

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

      No labels
      No labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions