Skip to content

dataclasses that inherit from Protocol subclasses have wrong __init__ #89244

@julianfortune

Description

@julianfortune
BPO 45081
Nosy @ericvsmith, @ambv, @serhiy-storchaka, @icgood, @miss-islington, @uriyyo, @Fidget-Spinner, @julianfortune, @edgarrmondragon, @shr1k
PRs
  • bpo-45081: Fix __init__ method generation when inheriting from Protocol #28121
  • [3.10] bpo-45081: Fix __init__ method generation when inheriting from Protocol (GH-28121) #28131
  • [3.9] bpo-45081: Fix __init__ method generation when inheriting from Protocol (GH-28121) #28132
  • Files
  • test.py: Example of another issue with Protocol subclassing
  • 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 2021-09-02.18:46:32.940>
    created_at = <Date 2021-09-01.21:06:11.095>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'dataclasses that inherit from Protocol subclasses have wrong __init__'
    updated_at = <Date 2021-09-12.21:38:03.668>
    user = 'https://github.com/julianfortune'

    bugs.python.org fields:

    activity = <Date 2021-09-12.21:38:03.668>
    actor = 'icgood'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-02.18:46:32.940>
    closer = 'julianfortune'
    components = ['Library (Lib)']
    creation = <Date 2021-09-01.21:06:11.095>
    creator = 'julianfortune'
    dependencies = []
    files = ['50277']
    hgrepos = []
    issue_num = 45081
    keywords = ['patch']
    message_count = 7.0
    messages = ['400868', '400936', '400939', '400979', '401647', '401671', '401672']
    nosy_count = 10.0
    nosy_names = ['eric.smith', 'lukasz.langa', 'serhiy.storchaka', 'icgood', 'miss-islington', 'uriyyo', 'kj', 'julianfortune', 'edgarrmondragon', 'shrik']
    pr_nums = ['28121', '28131', '28132']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45081'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10only security fixes3.11only security fixes3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions