Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on memoryviews #59

Open
mrocklin opened this issue Apr 13, 2016 · 1 comment
Open

Fails on memoryviews #59

mrocklin opened this issue Apr 13, 2016 · 1 comment

Comments

@mrocklin
Copy link
Contributor

The current implementation treats memoryview objects as strings. This both fails in Python 3 because the Pickler.save_string method does not exist (see Pickler.save_bytes instead), and because memoryviews are significantly more complex than their Python buffer cousins.

@jakirkham
Copy link
Member

This seems to work today. Admittedly I'm testing with Python 3.8, which may make some difference.

In [1]: import cloudpickle

In [2]: m = memoryview(b"abc")

In [3]: cloudpickle.loads(cloudpickle.dumps(m))
Out[3]: b'abc'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants