]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 17 Jul 2026 07:49:11 +0000 (10:49 +0300)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 07:49:11 +0000 (10:49 +0300)
commit190d2ffbb969ad571fd12d4988b37519091194d5
treef3c1c4c760a1a3dcf177c9701e19126146d7dd67
parent2931f2067a6ecdc52cb44f694ce14ab8b50b9a32
gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627)

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.

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