-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Some Unicode format specifiers are incorrect #146615
Copy link
Copy link
Open
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:
Inspired by #146578, I wrote a checker to check all unicode format strings.
There are 2 kinds of errors.
- There are ~8 real mistakes.
- Comply with C99 for va_list: https://en.cppreference.com/w/c/variadic/va_arg.html
Most of the changes are%d<->%ldforintandPy_ssize_t.
I opened an draft PR #146616 containing only the fixes to display what could be changed. We can discuss and cherry pick some fixes in that PR.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-146615: Fix format specifiers in error messages for consistency and correctness #146616
- gh-146615: Fix format specifiers in extension modules #146617
- gh-146615: Fix format specifiers in test cextensions #146618
- gh-146615: Fix format specifiers in
Python/directory #146619 - gh-146615: Fix format specifiers in
Objects/directory #146620 - gh-146615: Fix error message in method_get for invalid type argument #146634
- [3.14] gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) #146647
- [3.13] gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) #146648
- [3.14] gh-146615: Fix format specifiers in test cextensions (GH-146618) #146649
- [3.14] gh-146615: Fix format specifiers in Python/ directory (GH-146619) #146650
- [3.14] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) #146651
- [3.14] gh-146615: Fix format specifiers in extension modules (GH-146617) #146652
- [3.13] gh-146615: Fix format specifiers in test cextensions (GH-146618) #146653
- [3.13] gh-146615: Fix format specifiers in Python/ directory (GH-146619) #146654
- [3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) #146655
- [3.13] gh-146615: Fix format specifiers in extension modules (GH-146617) (GH-146652) #146658
- [3.14] gh-146615: Fix format specifiers in extension modules (GH-146617) #147704
- [3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) #147705
Reactions are currently unavailable
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