Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skirpichev opened this issue Feb 3, 2024 · 1 comment
Closed

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

skirpichev opened this issue Feb 3, 2024 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@skirpichev
Copy link
Member

skirpichev commented Feb 3, 2024

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

@skirpichev skirpichev added the type-bug An unexpected behavior, bug, or error label Feb 3, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue Feb 3, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue Feb 26, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue Jul 19, 2024
@skirpichev
Copy link
Member Author

Seems to be fixed now.

@skirpichev skirpichev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant