gh-146615: Fix format specifiers in Objects/ directory#146620
gh-146615: Fix format specifiers in Objects/ directory#146620sunmy2019 wants to merge 1 commit intopython:mainfrom
Objects/ directory#146620Conversation
| PyErr_Format(PyExc_TypeError, | ||
| "descriptor '%V' needs a type, not '%s', as arg 2", | ||
| descr_name((PyDescrObject *)descr), | ||
| descr_name((PyDescrObject *)descr), "?", |
There was a problem hiding this comment.
%V takes two arguments: PyObject* (Unicode object) and const char*. The latter is used when the former is NULL. There was a hard bug here, this code did not work and perhaps crashed.
There was a problem hiding this comment.
Oh! I didn't know about the %V format (I think I never used it...)
There was a problem hiding this comment.
It is worth to extract this case into a separate PR, and add test for it. Unlike to other cases, it never worked on any platforms.
There was a problem hiding this comment.
Yes, a separate test would be fine I guess. And it could have its proper NEWS entry if necessary.
|
I would suggest that we merge the various PRs without a NEWS entry and that we create one new entry for many PRs and add a commit message with links to those PRs. |
Uh oh!
There was an error while loading. Please reload this page.