bpo-43907: add missing memoize call in pure python pickling of bytearray (GH-25501)

This commit is contained in:
Carl Friedrich Bolz-Tereick 2021-04-23 23:27:14 +02:00 committed by GitHub
parent f24e2e5464
commit 1e9f093309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View file

@ -818,6 +818,7 @@ class _Pickler:
self._write_large_bytes(BYTEARRAY8 + pack("<Q", n), obj)
else:
self.write(BYTEARRAY8 + pack("<Q", n) + obj)
self.memoize(obj)
dispatch[bytearray] = save_bytearray
if _HAVE_PICKLE_BUFFER: