Skip to content

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

Merged
merged 2 commits into from
Jul 11, 2025

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.

Co-authored-by: Victor Stinner <vstinner@python.org>
@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 <vstinner@python.org>
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy