pyldb: Add Python 3 compatibility (except strings)
authorPetr Viktorin <pviktori@redhat.com>
Tue, 9 Jun 2015 08:36:26 +0000 (10:36 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 5 Nov 2015 17:04:24 +0000 (18:04 +0100)
commitb509cbd8fcc7faedf8b66305d68b1cf58c834396
treed13628ff7d095f92b8da3d027e05437a8bc50fa9
parenta04cfaa179248f4483d4201acb05f02f75130047
pyldb: Add Python 3 compatibility (except strings)

- Use a macro for adding constants to module
(This also ensures that the Python constants have the same
name as the C ones. One existing misspelling is retained.)

- Use new module initialization for Python 3

- Use rich comparison for ldb objects

- Prepare tests for Python 3

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/ldb/pyldb.c
lib/ldb/tests/python/api.py