New submission from Memeplex:

In [1]: mv = memoryview(b'123')
In [2]: mv.__reduce__()
    TypeError: can't pickle memoryview objects

But then:

In [3]: pickle.dumps(mv)
    b'\x80\x03cbuiltins\nmemoryview\nq\x00)\x81q\x01.'

Even worse:

In [4]: pickle.loads(pickle.dumps(mv))
    TypeError: Required argument 'object' (pos 1) not found

According to the module documentation: Attempts to pickle unpicklable objects 
will raise the PicklingError exception.

----------
components: Extension Modules
messages: 266212
nosy: memeplex
priority: normal
severity: normal
status: open
title: Pickle of memoryview not raising error
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27098>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to