]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-113028: Correctly memoize str in pickle when escapes added (GH-113436)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 24 Dec 2023 10:01:53 +0000 (11:01 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Dec 2023 10:01:53 +0000 (10:01 +0000)
commit336d44593486288742e4b8009282da1af62d87ba
tree2eddb86f7d3d29be70222078fe61343dfc44a8f7
parentb60bddbde22f74a2289f4838a6c404c53c58e57b
[3.11] gh-113028: Correctly memoize str in pickle when escapes added (GH-113436) (GH-113449)

This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.
(cherry picked from commit 08398631a0298dcf785ee7bd0e26c7844823ce59)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
Lib/pickle.py
Lib/test/pickletester.py
Misc/NEWS.d/next/Library/2023-12-23-16-51-17.gh-issue-113028.3Jmdoj.rst [new file with mode: 0644]