]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-145633: Fix struct.pack('f') on s390x (#146422) (#146461)
authorVictor Stinner <vstinner@python.org>
Thu, 26 Mar 2026 11:45:10 +0000 (12:45 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Mar 2026 11:45:10 +0000 (11:45 +0000)
commit921515f603980b6cd8418c5bed444b52edbff1ea
tree8287615f6ecdb2dbfd160c9a3308679f343c13f5
parentfc4b4221e5f6cf53e61ccbf716165d6192b9fd40
[3.13] gh-145633: Fix struct.pack('f') on s390x (#146422) (#146461)

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

Use PyFloat_Pack4() to raise OverflowError.
Add more tests on packing/unpacking floats.

(cherry picked from commit 8de70b31c59b1d572d95f8bb471a09cfe4cd2b13)

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