]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] 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:23:01 +0000 (10:23 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 08:23:01 +0000 (08:23 +0000)
commit21ab8eb5a87852c8336e18fb912073a4e4ac0c19
tree0493950bdc72b2d3aa78a037fa2d348aa4fa7285
parent38c3f112c383d1f61a3e2d2d4ff589a5ca570944
[3.15] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627) (GH-153834)

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