python module compatibility with 3.x (and 2.6+)#14
python module compatibility with 3.x (and 2.6+)#14crackwitz wants to merge 1 commit intogolems:masterfrom
Conversation
enabling pre-2.6 requires getting rid of that python compat header and defining what's needed manually
|
Would you be willing to contribute some test cases for this? We're not currently using the python bindings in my group, so I don't have any tests ready to go. Ideally, we would call the python tests along with all the others in |
|
makes sense. I'll take a look. by the way: when calling |
Thanks, I've put together some initial continuous integration tests using Docker and Travis in dev/contint (0ba3ab5). Not currently building the python module in those tests. I have travis+docker+python2 working in another project, but maybe you have something better for python3.
For userspace channels, one could read the
I use memory regions. For my usage, at least, I don't see any race conditions to expand the region on ACH_OVERFLOW. |
Enabling pre-2.6 requires getting rid of that
bytesobject.hcompat header and defining what's needed manually. I figured to leave it alone until someone asks for pre-2.6.I have tested this a little. I see no compiler errors or warnings and opening a channel and getting from it works as expected. the most confusing thing was python's refcounting and whether the incref was really needed. I believe all the changes (in particular the
PyLong_FromLonguses) are okay.I'm planning changes to the python side that make get/put a little easier (create buffer implicitly, ...) that will get its own pull request.