Skip to content

descriptor __set_name__ feature broken for dataclass descriptor fields #77322

@Ricyteach

Description

@Ricyteach
mannequin
BPO 33141
Nosy @ericvsmith, @miss-islington, @Ricyteach
PRs
  • bpo-33141: Have dataclasses.Field pass through __set_name__ to any default descriptor. #6260
  • [3.7] bpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument. (GH-6260) #6261
  • Files
  • broken__set_name__.py: raises AttributeError on accessing descriptor_object.name attribute
  • 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 = 'https://github.com/ericvsmith'
    closed_at = <Date 2018-03-26.18:14:56.616>
    created_at = <Date 2018-03-26.02:25:48.957>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'descriptor __set_name__ feature broken for dataclass descriptor fields'
    updated_at = <Date 2018-03-26.18:14:56.615>
    user = 'https://github.com/Ricyteach'

    bugs.python.org fields:

    activity = <Date 2018-03-26.18:14:56.615>
    actor = 'eric.smith'
    assignee = 'eric.smith'
    closed = True
    closed_date = <Date 2018-03-26.18:14:56.616>
    closer = 'eric.smith'
    components = ['Library (Lib)']
    creation = <Date 2018-03-26.02:25:48.957>
    creator = 'Ricyteach'
    dependencies = []
    files = ['47499']
    hgrepos = []
    issue_num = 33141
    keywords = ['patch']
    message_count = 16.0
    messages = ['314438', '314446', '314447', '314452', '314458', '314459', '314460', '314463', '314466', '314467', '314468', '314469', '314470', '314471', '314473', '314474']
    nosy_count = 3.0
    nosy_names = ['eric.smith', 'miss-islington', 'Ricyteach']
    pr_nums = ['6260', '6261']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33141'
    versions = ['Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)end of life3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions