GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias · Issue #89826 · python/cpython

is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias #89826

New issue
Copy link
New issue
Copy link
Closed
Closed
is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias#89826
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Oct 28, 2021
Issue body actions
BPO 45663
Nosy @gvanrossum, @ericvsmith, @serhiy-storchaka, @miss-islington
PRs
  • bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias #29294
  • [3.10] bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) #29925
  • [3.9] bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) #29926
  • 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-07.12:01:12.403>
    created_at = <Date 2021-10-28.20:10:31.152>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias'
    updated_at = <Date 2021-12-07.12:01:12.402>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-12-07.12:01:12.402>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-07.12:01:12.403>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2021-10-28.20:10:31.152>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45663
    keywords = ['patch']
    message_count = 4.0
    messages = ['405256', '407739', '407743', '407745']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'eric.smith', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['29294', '29925', '29926']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45663'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. serhiy-storchaka commented on Oct 28, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Oct 28, 2021
      MemberAuthor
      More actions
      >>> import dataclasses, types
      >>> @dataclasses.dataclass
      ... class A(types.GenericAlias):
      ...     origin: type
      ...     args: type
      ... 
      >>> dataclasses.is_dataclass(A)
      True
      >>> a = A(list, int)
      >>> dataclasses.is_dataclass(type(a))
      True
      >>> dataclasses.is_dataclass(a)
      False
    2. serhiy-storchaka
      added
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      3.11only security fixesonly security fixes
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Oct 28, 2021
    3. serhiy-storchaka commented on Dec 5, 2021

      @serhiy-storchaka
      serhiy-storchaka
      on Dec 5, 2021
      MemberAuthor
      More actions

      New changeset 446be16 by Serhiy Storchaka in branch 'main':
      bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)
      446be16

    4. miss-islington commented on Dec 5, 2021

      @miss-islington
      miss-islington
      on Dec 5, 2021
      Contributor
      More actions

      New changeset abceb66 by Miss Islington (bot) in branch '3.10':
      bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)
      abceb66

    5. miss-islington commented on Dec 5, 2021

      @miss-islington
      miss-islington
      on Dec 5, 2021
      Contributor
      More actions

      New changeset 1905071 by Miss Islington (bot) in branch '3.9':
      bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)
      1905071

    6. serhiy-storchaka
      closed this as completedon Dec 7, 2021
    7. serhiy-storchaka
      closed this as completedon Dec 7, 2021
    8. ezio-melotti
      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 lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.