Skip to content

Incorrect repr of InitVar of a type alias #89825

Description

@serhiy-storchaka
BPO 45662
Nosy @gvanrossum, @ericvsmith, @serhiy-storchaka, @miss-islington
PRs
  • bpo-45662: Fix the repr of InitVar with a type alias to the built-in class #29291
  • [3.10] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) #29923
  • [3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) #29924
  • 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-12-10.09:47:23.655>
    created_at = <Date 2021-10-28.19:46:03.203>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'Incorrect repr of InitVar of a type alias'
    updated_at = <Date 2021-12-10.09:47:23.654>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-12-10.09:47:23.654>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-10.09:47:23.655>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2021-10-28.19:46:03.203>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45662
    keywords = ['patch']
    message_count = 4.0
    messages = ['405241', '407738', '407742', '408184']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'eric.smith', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['29291', '29923', '29924']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45662'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. serhiy-storchaka commented on Oct 28, 2021

      @serhiy-storchaka
      MemberAuthor

      The repr of InitVar preserves type aliases from the typing module, but not builtin.

      >>> import typing, dataclasses
      >>> dataclasses.InitVar[typing.List[int]]
      dataclasses.InitVar[typing.List[int]]
      >>> dataclasses.InitVar[list[int]]
      dataclasses.InitVar[list]
    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Oct 28, 2021
    3. serhiy-storchaka commented on Dec 5, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset 1fd4de5 by Serhiy Storchaka in branch 'main':
      bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)
      1fd4de5

    4. miss-islington commented on Dec 5, 2021

      @miss-islington
      Contributor

      New changeset f1dd5ed by Miss Islington (bot) in branch '3.10':
      bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)
      f1dd5ed

    5. serhiy-storchaka commented on Dec 10, 2021

      @serhiy-storchaka
      MemberAuthor

      New changeset fb8aad1 by Miss Islington (bot) in branch '3.9':
      [3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) (GH-29924)
      fb8aad1

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.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