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

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

Closed
1st1 opened this issue Jan 23, 2014 · 2 comments
Closed

Comments

@1st1
Copy link
Member

1st1 commented Jan 23, 2014

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 = []

    @1st1
    Copy link
    Member Author

    1st1 commented Jan 23, 2014

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 27, 2014

    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

    @1st1 1st1 closed this as completed Jan 27, 2014
    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant