python / python/cpython

PyType_FromSpec*() overwrites the type's "__module__"

Open
#84,880 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.10 3.9 (EOL) topic-C-API type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 40703
Nosy @ncoghlan, @scoder, @encukou, @serhiy-storchaka, @miss-islington, @shihai1991
PRs
  • python/cpython#20273
  • python/cpython#20782
  • 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 = None
    created_at = <Date 2020-05-20.21:24:32.273>
    labels = ['expert-C-API', 'type-bug', '3.9', '3.10']
    title = 'PyType_FromSpec*() overwrites the type\'s "__module__"'
    updated_at = <Date 2020-10-20.11:48:55.197>
    user = 'https://github.com/scoder'
    

    bugs.python.org fields:

    activity = <Date 2020-10-20.11:48:55.197>
    actor = 'petr.viktorin'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['C API']
    creation = <Date 2020-05-20.21:24:32.273>
    creator = 'scoder'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40703
    keywords = ['patch']
    message_count = 4.0
    messages = ['369476', '371215', '371220', '379114']
    nosy_count = 6.0
    nosy_names = ['ncoghlan', 'scoder', 'petr.viktorin', 'serhiy.storchaka', 'miss-islington', 'shihai1991']
    pr_nums = ['20273', '20782']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40703'
    versions = ['Python 3.9', 'Python 3.10']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by reviewing the PyType_FromSpec* C API entry points and the referenced PRs #20273 and #20782; the issue names no source files or tests. Confirm the intended module behavior and verify that the reported overwrite is addressed in the relevant C API coverage.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    c, python
    Domain
    api, backend
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Mostly clear
    Newbie friendliness
    18/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.