Skip to content

Wrong signature in type.__prepare__() class method #114949

Description

@skirpichev

Bug report

Bug description:

Docstring of this method has following signature specification:

     PyDoc_STR("__prepare__($cls, name, bases, /, **kwds)\n"
               ...

It's wrong, the first argument should be $type (a class method). Because of this, the inspect.signature() fails to parse the __text_signature__ attribute for the method.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. added a commit that references this issue on Feb 3, 2024
  2. added a commit that references this issue on Feb 26, 2024
  3. added a commit that references this issue on Jul 19, 2024
  4. skirpichev commented on Sep 30, 2024

    @skirpichev
    MemberAuthor

    Seems to be fixed now.

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

    type-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions