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

abc conflicts with __init_subclass__ #87993

Closed
vladhoi mannequin opened this issue Apr 13, 2021 · 3 comments
Closed

abc conflicts with __init_subclass__ #87993

vladhoi mannequin opened this issue Apr 13, 2021 · 3 comments
Labels
3.8 only security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@vladhoi
Copy link
Mannequin

vladhoi mannequin commented Apr 13, 2021

BPO 43827
Nosy @rhettinger, @pganssle, @vladhoi, @arhadthedev
PRs
  • bpo-43827: Fixed abc conflicts with __init_subclass__ #25385
  • 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 2021-04-13.07:57:15.219>
    labels = ['extension-modules', 'type-bug', '3.8']
    title = 'abc conflicts with __init_subclass__'
    updated_at = <Date 2021-11-21.12:10:32.102>
    user = 'https://github.com/vladhoi'

    bugs.python.org fields:

    activity = <Date 2021-11-21.12:10:32.102>
    actor = 'arhadthedev'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2021-04-13.07:57:15.219>
    creator = 'vladhoi'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43827
    keywords = ['patch']
    message_count = 2.0
    messages = ['390933', '406713']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'stutzbach', 'p-ganssle', 'vladhoi', 'arhadthedev']
    pr_nums = ['25385']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43827'
    versions = ['Python 3.8']

    @vladhoi
    Copy link
    Mannequin Author

    vladhoi mannequin commented Apr 13, 2021

    from abc import ABC
    
    
    class A:
        def __init_subclass__(self):
            pass
    
    
    class B(ABC, A, name="name"):
        pass

    After initialising class B, this exception occurs, because multiple "name" arguments where provided:

    Traceback (most recent call last):
      File "test_abc", line 9, in <module>
        class B(ABC, A, name="name"):
    TypeError: __new__() got multiple values for argument 'name'

    @vladhoi vladhoi mannequin added type-crash A hard crash of the interpreter, possibly with a core dump 3.8 only security fixes extension-modules C modules in the Modules dir labels Apr 13, 2021
    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 16, 2021
    @arhadthedev
    Copy link
    Member

    Paul, PR OP made all changes requested; could you re-review please?

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    MarkKoz added a commit to csun-comp430-s22/lispy that referenced this issue Apr 30, 2022
    @JelleZijlstra
    Copy link
    Member

    Thanks for your contribution!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants