Description of problem: The python interface code is version 2 specific - many of the Api calls made are not available in the Python 3 libraries. Version-Release number of selected component (if applicable): How reproducible: Compile the code under the Python3 development environment. Actual results: ../../../python/guestfs-py.h: In function 'put_handle': ../../../python/guestfs-py.h:58:5: warning: implicit declaration of function 'PyCObject_FromVoidPtrAndDesc' [-Wimplicit-function-declaration] ../../../python/guestfs-py.h:57:3: warning: return makes pointer from integer without a cast [enabled by default] ../../../python/guestfs-py.c: In function 'get_string_list': ../../../python/guestfs-py.c:56:5: warning: implicit declaration of function 'PyString_AsString' [-Wimplicit-function-declaration] ../../../python/guestfs-py.c:56:10: warning: assignment makes pointer from integer without a cast [enabled by default] Function `PyString_AsString' implicitly converted to pointer at ../../../python/guestfs-py.c:56 ../../../python/guestfs-py.c: In function 'put_string_list': ../../../python/guestfs-py.c:73:5: warning: implicit declaration of function 'PyString_FromString' [-Wimplicit-function-declaration] ../../../python/guestfs-py.c:73:5: warning: passing argument 3 of 'PyList_SetItem' makes pointer from integer without a cast [enabled by default] /usr/include/python3.2mu/listobject.h:55:17: note: expected 'struct PyObject *' but argument is of type 'int' ../../../python/guestfs-py.c: In function 'put_table': ../../../python/guestfs-py.c:90:5: warning: passing argument 3 of 'PyTuple_SetItem' makes pointer from integer without a cast [enabled by default] /usr/include/python3.2mu/tupleobject.h:46:17: note: expected 'struct PyObject *' but argument is of type 'int' ../../../python/guestfs-py.c:91:5: warning: passing argument 3 of 'PyTuple_SetItem' makes pointer from integer without a cast [enabled by default] /usr/include/python3.2mu/tupleobject.h:46:17: note: expected 'struct PyObject *' but argument is of type 'int' ../../../python/guestfs-py.c: In function 'put_lvm_pv': ../../../python/guestfs-py.c:128:25: warning: passing argument 3 of 'PyDict_SetItemString' makes pointer from integer without a cast [enabled by default] /usr/include/python3.2mu/dictobject.h:156:17: note: expected 'struct PyObject *' but argument is of type 'int' etc, etc. Expected results: Additional info:
See build log: https://launchpadlibrarian.net/84263658/buildlog_ubuntu-precise-amd64.libguestfs_1.14.0-1_FAILEDTOBUILD.txt.gz
These refs look useful ... http://docs.python.org/release/3.0.1/whatsnew/3.0.html http://python3porting.com/cextensions.html
These patches are not very heavily tested, but they fix Python 3 support for me at least ... http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=646142f5136da9cfe2b908703a822c53350f70e9 http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=25454b83082a4cfed4f1664d2f9cdfcb222ba7c2 http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=e2249b7ce1dd0a2f8f110e0e47aca397185a6373 http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=2116f79cbcd4605b4997931285f14dde1f72a992
And this one too ... http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=31e5539a14f78d8815d0d930e91023a65b5395e7
The fix has been included upstream for a while, closing.