]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation ...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 2 May 2026 09:04:05 +0000 (12:04 +0300)
committerGitHub <noreply@github.com>
Sat, 2 May 2026 09:04:05 +0000 (12:04 +0300)
commitb89735625dff07005c31bdc86cbe7113ef1b59d0
treef29efbc8b69cbd3152f25b28e29abea474465517
parente635ad2c68399b5da7918392dc913a9e10aa2726
gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation (GH-149052)

Previously, identical PickleBuffers did not preserve identity.
Also, empty writable PickleBuffer memoized an empty bytearray object
in place of b'' which is a singleton in CPython, so the following
references to b'' were unpickled as an empty bytearray object.
Lib/pickle.py
Lib/test/pickletester.py
Misc/NEWS.d/next/Library/2026-04-27-17-12-11.gh-issue-148914.i5C3kW.rst [new file with mode: 0644]