Skip to content

ParamSpec args and kwargs are not equal to themselves. #90834

Description

@GBeauregard
BPO 46676
Nosy @serhiy-storchaka, @JelleZijlstra, @GBeauregard
PRs
  • bpo-46676: Make ParamSpec args and kwargs equal to themselves #31203
  • [3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves … #31210
  • 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 2022-02-08.08:41:51.139>
    created_at = <Date 2022-02-07.19:16:53.370>
    labels = ['type-bug', 'library', '3.10', '3.11']
    title = 'ParamSpec args and kwargs are not equal to themselves.'
    updated_at = <Date 2022-02-08.08:41:51.138>
    user = 'https://github.com/GBeauregard'

    bugs.python.org fields:

    activity = <Date 2022-02-08.08:41:51.138>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-08.08:41:51.139>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2022-02-07.19:16:53.370>
    creator = 'GBeauregard'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46676
    keywords = ['patch']
    message_count = 3.0
    messages = ['412781', '412816', '412820']
    nosy_count = 3.0
    nosy_names = ['serhiy.storchaka', 'JelleZijlstra', 'GBeauregard']
    pr_nums = ['31203', '31210']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46676'
    versions = ['Python 3.10', 'Python 3.11']

    Activity

    1. GBeauregard commented on Feb 7, 2022

      GBeauregardmannequin
      MannequinAuthor
      from typing import ParamSpec
      P = ParamSpec("P")
      print(P.args == P.args)  # False
      print(P.kwargs == P.kwargs)  # False

      ParamSpec args and kwargs are not equal to themselves; this can cause problems for unit tests and type introspection w/ e.g. get_type_hints.

      I will fix this by adding an __eq__ method like other places in typing.py

    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Feb 7, 2022
    3. serhiy-storchaka commented on Feb 8, 2022

      @serhiy-storchaka
      Member

      New changeset c8b62bb by Gregory Beauregard in branch 'main':
      bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203)
      c8b62bb

    4. serhiy-storchaka commented on Feb 8, 2022

      @serhiy-storchaka
      Member

      New changeset cbdcae5 by Gregory Beauregard in branch '3.10':
      [3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203) (GH-31210)
      cbdcae5

    5. 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 fixesstdlibStandard 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