[issue27098] Pickle of memoryview not raising error

Xiang Zhang report at bugs.python.org
Mon May 23 23:10:23 EDT 2016


Xiang Zhang added the comment:

I cannot reproduce this. Pickling memoryview objects works well on my OS.

Python 3.5.1+ (default, Mar 30 2016, 22:46:26) 
[GCC 5.3.1 20160330] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> mv = memoryview(b'123')
>>> mv.__reduce__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/copyreg.py", line 65, in _reduce_ex
    raise TypeError("can't pickle %s objects" % base.__name__)
TypeError: can't pickle memoryview objects
>>> pickle.dumps(mv)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't pickle memoryview objects

----------
nosy: +xiang.zhang

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27098>
_______________________________________


More information about the Python-bugs-list mailing list