-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
PyArg_UnpackTuple(args, "", causes empty name to be used in error messages:
>>> str.join.__get__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected at least 1 argument, got 0
# ^^
>>> try: str.join.__get__()
... except Exception as e: exc = e
...
>>> str(exc)
' expected at least 1 argument, got 0'
#^According to my quick search, PyArg_UnpackTuple(args, "", is used 10 times in Objects/typeobject.c and 3 times in Modules/_csv.c.
CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-123446: Fix empty function names in
TypeErrors in_csvmodule #123461 - gh-123446: Fix empty function names in
TypeErrors in_csvmodule (follow-up to gh-123461) #123462 - [3.12] gh-123446: Fix empty function names in
TypeErrors in_csvmodule (GH-123462) #123466 - gh-123446: Fix empty function names in
TypeErrors intypeobject#123470
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error