Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 5, 2021

https://bugs.python.org/issue45034

It was:

struct.error: ushort format requires 0 <= number <= (0x7fff * 2 + 1)

It is now:

struct.error: ushort format requires 0 <= number <= 65535

@mdickinson
Copy link
Member

Thanks for the PR. I think we should extend the fix to np_short, too: those uses of Py_STRINGIFY never really made much sense.

sobolevn and others added 2 commits September 6, 2021 11:21
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
@sobolevn
Copy link
Member Author

sobolevn commented Sep 6, 2021

I think we should extend the fix to np_short, too: those uses of Py_STRINGIFY never really made much sense.

Will do! Thanks a lot for your help 👍

Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thank you! Do you want to add your name to the list in Misc/ACKS? (It's entirely optional.)

@sobolevn
Copy link
Member Author

sobolevn commented Sep 7, 2021

Do you want to add your name to the list in Misc/ACKS?

Why not? 😄 Added!

Thanks a lot for your help! 👍

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about other integer and floating point types?

@mdickinson
Copy link
Member

What about other integer and floating point types?

I think we can leave broader changes for a separate PR, if anyone feels inclined; this PR addresses the immediate issue that @stevendaprano was seeing, which was due to inappropriate uses of Py_STRINGIFY.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@sobolevn
Copy link
Member Author

sobolevn commented Sep 7, 2021

Let's have an explicit cast then 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants