]> arthur.barton.de Git - bup.git/commit
Make adjustments to fix tbloom for python 3
authorRob Browning <rlb@defaultvalue.org>
Mon, 14 Oct 2019 23:48:24 +0000 (18:48 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 15 Dec 2019 20:57:33 +0000 (14:57 -0600)
commitd87a9fadca4fddb8fd40299c62567bf192572122
tree02dba365e7ca38397e2c3db355c41d065096b900
parent63a0592dc920a09be7fb2f8068a38440c06f7ac9
Make adjustments to fix tbloom for python 3

Make the changes needed to get the tbloom tests passing with python 3.
Change the C helper argument conversions to types that work with each
version (there didn't appear to be a good, shared common format string
type).  Switch to a Py_buffer in some places because python 3 didn't
appear to have a conversion that would convert all the binary
inputs (buffer/memoryview/...) to a plain C byte array the way python
2 can.

Change all the other typical things, i.e. byte paths, '' to b'', and
// for integral division, etc.

With this, tbloom should pass with both python major versions (python
3 version tested was python 3.7.5).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
lib/bup/_helpers.c
lib/bup/bloom.py
lib/bup/helpers.py
lib/bup/t/tbloom.py