Skip to content

Conversation

@wsfulton
Copy link
Contributor

@wsfulton wsfulton commented Jul 4, 2025

  • Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
  • Remove legacy %.200s format specifier for truncating type names.

- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.
@ZeroIntensity ZeroIntensity added the tests Tests in the Lib/test dir label Jul 4, 2025
@vstinner vstinner changed the title gh-136300 Modify C tests to conform to PEP-737 gh-136300: Modify C tests to conform to PEP-737 Jul 8, 2025
@vstinner
Copy link
Member

vstinner commented Jul 8, 2025

Modify C tests to conform to PEP-737

The PEP is clear that it only affects new code:

Recommend using the type fully qualified name in error messages and in repr() methods in new C code. Recommend not truncating type names in new C code.

But I'm fine with this very specific change which only changes C tests. There is no risk of backward compatibility issue.

@encukou encukou merged commit 7de8ea7 into python:main Jul 11, 2025
39 checks passed
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.

Co-authored-by: Victor Stinner <[email protected]>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.

Co-authored-by: Victor Stinner <[email protected]>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.

Co-authored-by: Victor Stinner <[email protected]>
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants