]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 17 Jul 2026 08:26:14 +0000 (11:26 +0300)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 08:26:14 +0000 (08:26 +0000)
commitc8a0fbf2a6851a060270e53c045b2b7d1c06bf95
tree5e3627e84c5de7a47b01efc304697c9972add32c
parent05f0b61e6d67621c88c0cf0d900181dc1d32ca0c
[3.13] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627) (GH-153836)

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: 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