]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 17 Jul 2026 08:16:34 +0000 (10:16 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 08:16:34 +0000 (08:16 +0000)
commitf8298e59cdd6fb28f6b6b9d0aaef2117349006e4
treeb98597911594d552f41d8e24c77ae947dd644e84
parent1b060a65467d62d6ed89a67ba5524f004fcef709
[3.14] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627) (GH-153835)

Normalize bytes format strings to str before using them as the cache key,
so that equal str and bytes formats no longer collide and get compared.
(cherry picked from commit 190d2ffbb969ad571fd12d4988b37519091194d5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/test/test_struct.py
Misc/NEWS.d/next/Library/2026-07-12-00-00-00.gh-issue-85943.8f906e.rst [new file with mode: 0644]
Modules/_struct.c