python / python/cpython

__module__ attribute is not set correctly for a class created by direct metaclass call

Open
#73,055 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.7 (EOL) 3.8 (EOL) 3.9 (EOL) interpreter-core type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 28869
Nosy @stevendaprano, @serhiy-storchaka, @ilevkivskyi, @Vgr255, @hongweipeng, @alegonz
PRs
  • python/cpython#14126
  • python/cpython#14166
  • python/cpython#16613
  • 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 2016-12-04.21:09:34.786>
    labels = ['interpreter-core', '3.8', 'type-bug', '3.7', '3.9']
    title = '__module__ attribute is not set correctly for a class created by direct metaclass call'
    updated_at = <Date 2019-10-13.11:03:48.103>
    user = 'https://github.com/ilevkivskyi'
    

    bugs.python.org fields:

    activity = <Date 2019-10-13.11:03:48.103>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2016-12-04.21:09:34.786>
    creator = 'levkivskyi'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 28869
    keywords = ['patch']
    message_count = 20.0
    messages = ['282363', '282365', '282367', '282369', '282378', '345073', '345226', '345328', '345332', '345770', '345772', '345797', '345889', '345945', '348210', '348234', '348312', '354071', '354263', '354573']
    nosy_count = 6.0
    nosy_names = ['steven.daprano', 'serhiy.storchaka', 'levkivskyi', 'abarry', 'hongweipeng', 'alegonz']
    pr_nums = ['14126', '14166', '16613']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28869'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']
    

    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 reading the issue history and the three referenced pull requests, #14126, #14166, and #16613, since the issue is in patch review and work has already been proposed. Reproduce the direct metaclass-call behavior described by the title and determine whether the existing proposals establish the expected module value. Done means the behavior is corrected and covered by an appropriate regression test.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    backend
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    20/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.