pytalloc: Port to Python 3
authorPetr Viktorin <pviktori@redhat.com>
Thu, 15 Jan 2015 13:07:09 +0000 (14:07 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 May 2015 17:28:18 +0000 (19:28 +0200)
commitcd6615ecbd43d53fa353a18bd6db2291b086de2d
treebd96a5ec93727d9376efa1112ab192d5eea31317
parent9f71b96ba0068ddc613b925cd1be6885a696e443
pytalloc: Port to Python 3

- Use native string for repr

- Use rich comparison
  Removes the deprecated tp_compare in favor of tp_richcompare.
  Disparate types cannot be compared (except for == and !=),
  and True or False objects are returned explicitly.

- Use Py_TYPE instead of ob_type
  This changed to conform to C aliasing rules,
  see http://legacy.python.org/dev/peps/pep-3123/

- Don't provide CObject creation function
  A PyCapsule based replacement would be possible,
  but might not be necessary considering the function is
  not used much.

- Use new-style module initialization

Build changes:

- Use ABI flag in the lib name and pkg-config template

- Use the SAMBA_CHECK_PYTHON macro for finding Python

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
lib/talloc/pytalloc-util.pc.in
lib/talloc/pytalloc.c
lib/talloc/pytalloc.h
lib/talloc/pytalloc_guide.txt
lib/talloc/pytalloc_util.c
lib/talloc/test_pytalloc.c
lib/talloc/test_pytalloc.py
lib/talloc/wscript