-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-136300: Modify C tests to conform to PEP-737 #136301
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
base: main
Are you sure you want to change the base?
Conversation
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name. - Remove legacy %.200s format specifier for truncating type names.
"cannot index memory using \"%T\"", | ||
key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cannot index memory using \"%T\"", | |
key); | |
"cannot index memory using \"%T\"", key); |
PyErr_Format(PyExc_TypeError, "expect int, got %T", | ||
obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyErr_Format(PyExc_TypeError, "expect int, got %T", | |
obj); | |
PyErr_Format(PyExc_TypeError, "expect int, got %T", obj); |
PyErr_Format(PyExc_TypeError, "'%T' object is not callable", | ||
fn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyErr_Format(PyExc_TypeError, "'%T' object is not callable", | |
fn); | |
PyErr_Format(PyExc_TypeError, "'%T' object is not callable", fn); |
PyExc_TypeError, "expected function or code object, got %T", | ||
obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyExc_TypeError, "expected function or code object, got %T", | |
obj); | |
PyExc_TypeError, "expected function or code object, got %T", obj); |
The PEP is clear that it only affects new code:
But I'm fine with this very specific change which only changes C tests. There is no risk of backward compatibility issue. |
Uh oh!
There was an error while loading. Please reload this page.