]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-145633: Fix struct.pack('f') on s390x (GH-146422) (#146460)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 26 Mar 2026 11:38:42 +0000 (12:38 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Mar 2026 11:38:42 +0000 (11:38 +0000)
commit8a25840a2acdc9e7dcc35451556402a91f450430
tree699443c56d0c8d165f9633dca21ad3281534a5ed
parent7efa72a6e41e85eb0cff27daac58704b199f5832
[3.14] gh-145633: Fix struct.pack('f') on s390x (GH-146422) (#146460)

gh-145633: Fix struct.pack('f') on s390x (GH-146422)

Use PyFloat_Pack4() to raise OverflowError.
Add more tests on packing/unpacking floats.
(cherry picked from commit 8de70b31c59b1d572d95f8bb471a09cfe4cd2b13)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Lib/test/test_struct.py
Misc/NEWS.d/next/Library/2026-03-26-11-04-42.gh-issue-145633.RWjlaX.rst [new file with mode: 0644]
Modules/_struct.c