Message 55333 - Python tracker (original) (raw)

I've converted _bsddb.c to use the py3k buffer API for all data and keys it takes as input. All tests now fail with this error:

BufferError: Cannot make this object read-only.

This presumably results from this call:

PyObject_GetBuffer(obj, view, PyBUF_LOCKDATA)

I need to lock the data so that the GIL can be released during database operations (I/O).

Allowing bytes objects to have an immutability or readonly bit (internal or otherwise) has been a recent topic on the python-3000 mailing list; that would allow bytes' buffer API to satisfy this GetBuffer LOCKDATA request...