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

Support Python Memory Views #41

Open
lehanesa opened this issue Apr 22, 2019 · 2 comments
Open

Support Python Memory Views #41

lehanesa opened this issue Apr 22, 2019 · 2 comments

Comments

@lehanesa
Copy link

Python 3.8 introduces a new shared memory module for multiprocessing. The buffer is available as a python memory view.

Rather than copying the data to a new byte like object for decompression it would be great if we can pass the memory view directly. This would greatly improve the decompression when working with memory views. Currently it produces the error:

"argument 1 must be read-only bytes-like object, not memoryview"

@jd-boyd
Copy link
Owner

jd-boyd commented Apr 22, 2019

I would love to see a pull request to support this. However, at the moment it would also need to continue to support python 2.6, 2.7 and the 3.x back to 3.3.

@keelung-yang
Copy link

keelung-yang commented Sep 11, 2020

I got

TypeError: argument 1 must be read-only bytes-like object, not bytearray

I use bytearray because I've to serialize some data structure at runtime.

Some packages have dropped python 2.7 support in new release.
Ubuntu 20.04 have removed python2.
And some linux distribution have linked python command to /usr/bin/python3.
It's time to say goodbye to python2.

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

3 participants