Bug 623853

Summary: libguestfs uses PyCObject API (deprecated in Python 2.7)
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: extras-qa, mbooth, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-27 03:46:00 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 620842    

Description Dave Malcolm 2010-08-12 20:48:15 EDT
Description of problem:
Python 2.7 deprecated the PyCObject API in favor of a new "capsule" API.

The deprecations are set to "ignore" by default, so in theory the API still works.

However the deprecation has caused at least one app to fail (virt-manager, see bug 620216, due to it modifying the warning settings), so I've been doublechecking the scope of usage of the PyCObject, and am filing bugs against components that are possibly affected.

You can trigger a hard failure of the API via:
>>> import warnings
>>> warnings.filterwarnings('error')
and then use the affected part of the module (appears to be in py_guestfs_create).

./src/generator.ml:9507:    PyCObject_FromVoidPtrAndDesc ((void *) g, (char *) \"guestfs_h\", NULL);
./python/guestfs-py.c:56:    PyCObject_FromVoidPtrAndDesc ((void *) g, (char *) "guestfs_h", NULL);

I'm not yet sure what the best approach is to fixing this.

Version-Release number of selected component (if applicable):