Skip to content
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

PEP 737 implementation errors #117642

Closed
serhiy-storchaka opened this issue Apr 8, 2024 · 3 comments
Closed

PEP 737 implementation errors #117642

serhiy-storchaka opened this issue Apr 8, 2024 · 3 comments
Labels
3.13 bugs and security fixes topic-C-API type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Apr 8, 2024

Bug report

For some reasons gh-111696 implemented %T# and %N# instead of %#T and %#N. It does not only contradict PEP 737, but does not match the general principles of prinf-like format, and can cause problems in future.

Tests, which were added in gh-111696, were removed in gh-116417, so now this feature is not tested.

Linked PRs

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error topic-C-API 3.13 bugs and security fixes labels Apr 8, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Apr 8, 2024
* Fix implementation of %#T and %#N (they were implemented as %T# and
  %N#).
* Restore tests removed in pythongh-111696.
serhiy-storchaka added a commit that referenced this issue Apr 8, 2024
* Fix implementation of %#T and %#N (they were implemented as %T# and
  %N#).
* Restore tests removed in gh-116417.
@vstinner
Copy link
Member

vstinner commented Apr 8, 2024

I suppose that the issue can now be closed? Or did you spot other implementation issues?

@serhiy-storchaka
Copy link
Member Author

Nothing more. I noticed a weird handling of # and when tried to update the tests, did not found them at place.

@vstinner
Copy link
Member

vstinner commented Apr 8, 2024

Thanks for the fix.

diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
* Fix implementation of %#T and %#N (they were implemented as %T# and
  %N#).
* Restore tests removed in pythongh-116417.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes topic-C-API type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants