[New-bugs-announce] [issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer

Markus Mohrhard report at bugs.python.org
Thu Jul 4 23:33:15 EDT 2019


New submission from Markus Mohrhard <markusm at dug.com>:

The following piece of code

import pickle
pickle.loads(pickle.dumps(1, protocol=pickle.HIGHEST_PROTOCOL), buffers=None)

fails with "TypeError: 'NoneType' object is not iterable"

The corresponding PEP (https://www.python.org/dev/peps/pep-0574/) specifies that buffer=None is the default but the C implementation does not check for Py_None.

The PR contains a test for this case that fails without the fix.

----------
components: Library (Lib)
messages: 347299
nosy: Markus Mohrhard
priority: normal
severity: normal
status: open
title: Pure Python pickle module should not depend on _pickle.PickleBuffer
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37502>
_______________________________________


More information about the New-bugs-announce mailing list