Bug 750889 - Python code incompatible with Python v3.
Python code incompatible with Python v3.
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 13:24 EDT by Neil Wilson
Modified: 2012-05-02 11:49 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-02 11:49:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Neil Wilson 2011-11-02 13:24:31 EDT
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 13:31:23 EDT
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 11:49:04 EDT
The fix has been included upstream for a while, closing.

Note You need to log in before you can comment on or make changes to this bug.