Bug 750889

Summary: Python code incompatible with Python v3.
Product: [Community] Virtualization Tools Reporter: Neil Wilson <neil>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-02 15:49:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neil Wilson 2011-11-02 17:24:31 UTC
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:

Comment 2 Richard W.M. Jones 2011-11-02 17:31:23 UTC
These refs look useful ...

http://docs.python.org/release/3.0.1/whatsnew/3.0.html
http://python3porting.com/cextensions.html

Comment 5 Richard W.M. Jones 2012-05-02 15:49:04 UTC
The fix has been included upstream for a while, closing.