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

Add signatures for some builtins #111999

Closed
serhiy-storchaka opened this issue Nov 12, 2023 · 5 comments
Closed

Add signatures for some builtins #111999

serhiy-storchaka opened this issue Nov 12, 2023 · 5 comments
Labels
3.13 bugs and security fixes docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Nov 12, 2023

Feature or enhancement

Signature can be manually added for some builtin functions and classes that do not use Argument Clinic.

Linked PRs

@serhiy-storchaka serhiy-storchaka added type-feature A feature request or enhancement docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.13 bugs and security fixes labels Nov 12, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Nov 12, 2023
@serhiy-storchaka
Copy link
Member Author

This change exposed a bug in a test: #112001.

@JelleZijlstra
Copy link
Member

The signature for .format_map() is now incorrect:

>>> str.format_map.__text_signature__
'($self, /, mapping)'
>>> "x".format_map(mapping={})
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    "x".format_map(mapping={})
    ~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: str.format_map() takes no keyword arguments

@serhiy-storchaka
Copy link
Member Author

Thank you for catching this @JelleZijlstra.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 25, 2024
(cherry picked from commit 08e6543)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
JelleZijlstra pushed a commit that referenced this issue May 25, 2024
…119543)

(cherry picked from commit 08e6543)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@encukou
Copy link
Member

encukou commented May 28, 2024

Is there more to do here?

@JelleZijlstra
Copy link
Member

Thanks @serhiy-storchaka for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-feature A feature request or enhancement
Projects
Development

No branches or pull requests

3 participants