Bug 623853 - libguestfs uses PyCObject API (deprecated in Python 2.7)
Summary: libguestfs uses PyCObject API (deprecated in Python 2.7)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PyCObject
TreeView+ depends on / blocked
 
Reported: 2010-08-13 00:48 UTC by Dave Malcolm
Modified: 2010-08-27 07:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-27 07:46:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2010-08-13 00:48:15 UTC
Description of problem:
Python 2.7 deprecated the PyCObject API in favor of a new "capsule" API.
  http://docs.python.org/dev/whatsnew/2.7.html#capsules

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):
python-libguestfs-1.5.2-4.fc14.x86_64


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