Drop restriction that meta.__prepare__() must return a dict (subclass)

Open
#61,623 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by reading the linked type-namespace-restriction.diff patch, then review the dependent issues bpo-17422 and bpo-31588 for related constraints and failure cases. Done means the restriction on meta.prepare() is addressed consistently and the relevant class-creation behavior is verified by tests.

Written by the indexing model from the issue text.

Description

interpreter-core type-feature
BPO 17421
Nosy @loewis, @ncoghlan, @vstinner, @durban, @ericsnowcurrently, @serhiy-storchaka, @cdonovick
Dependencies
  • bpo-17422: language reference should specify restrictions on class namespace
  • bpo-31588: SystemError in class creation in case of a metaclass with a bad prepare() method
  • Files
  • type-namespace-restriction.diff
  • 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 2013-03-14.20:20:27.737>
    labels = ['type-feature']
    title = 'Drop restriction that meta.__prepare__() must return a dict (subclass)'
    updated_at = <Date 2019-03-12.22:17:10.507>
    user = 'https://github.com/ericsnowcurrently'
    

    bugs.python.org fields:

    activity = <Date 2019-03-12.22:17:10.507>
    actor = 'donovick'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2013-03-14.20:20:27.737>
    creator = 'eric.snow'
    dependencies = ['17422', '31588']
    files = ['29408']
    hgrepos = []
    issue_num = 17421
    keywords = ['patch']
    message_count = 6.0
    messages = ['184187', '184203', '184206', '184309', '303022', '337814']
    nosy_count = 7.0
    nosy_names = ['loewis', 'ncoghlan', 'vstinner', 'daniel.urban', 'eric.snow', 'serhiy.storchaka', 'donovick']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17421'
    versions = ['Python 3.4']
    

    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    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.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.