gh-130928: Fix error message during bytes formatting for the 'i' flag#130967
gh-130928: Fix error message during bytes formatting for the 'i' flag#130967sobolevn merged 5 commits intopython:mainfrom
Conversation
jstasiak
left a comment
There was a problem hiding this comment.
I think I'd add a unit test for this.
sobolevn
left a comment
There was a problem hiding this comment.
Yes, please, add a unit test :)
And also a NEWS entry. This is a user-visible change.
sobolevn
left a comment
There was a problem hiding this comment.
Thanks, I think that the fix is correct.
But, let's wait for @serhiy-storchaka review, because his is the code owner.
|
You can also add yourself to https://github.com/python/cpython/blob/main/Misc/ACKS |
Co-authored-by: sobolevn <mail@sobolevn.me>
Thanks, but I've already taken advantage of that opportunity earlier |
|
I would also suggest to create a new issue to add tests for |
|
@serhiy-storchaka friendly ping, what do you think? :) |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I think that test_common_format in test_format.py may be a better place for the tests. There are already tests for %d and %x. You can just add
test_exc_common('%i', '1', TypeError,
"%i format: a real number is required, not str")Or you can leave tests in both places.
|
We usually do not backport error message changes. |
Error output before correction:
Error output after correction: