Bug 623852 - gtk-vnc indirectly uses PyCObject API (deprecated in Python 2.7)
Summary: gtk-vnc indirectly uses PyCObject API (deprecated in Python 2.7)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk-vnc
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 621887 623844
Blocks: PyCObject
TreeView+ depends on / blocked
 
Reported: 2010-08-13 00:43 UTC by Dave Malcolm
Modified: 2010-11-08 10:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-11-08 10:11:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2010-08-13 00:43:20 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')
>>> import gtkvnc
python: /root/rpmbuild/BUILD/Python-2.7/Objects/dictobject.c:759: PyDict_SetItem: Assertion `value' failed.
Aborted

The usage (annoyingly) comes via macro code in header files in pygobject2 and pygtk2 (see bug 623844 and bug 621887).
./src/vncmodule.defs.c:9:#include "pygobject.h"
./src/vncmodule.c:21:#include <pygobject.h>
./src/vnc.override:4:#include "pygobject.h"

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

Version-Release number of selected component (if applicable):
gtk-vnc-0.4.1-3.fc14.src.rpm

Comment 1 Daniel Berrangé 2010-08-13 02:51:13 UTC
I'm not particularly inclined to change / fix the GTK-VNC python module. With the arrival of GTK-3 the existing python module is being deprecated and all apps should switch to using GObject introspection via PyGObject. In the mean time, simply don't set 'filterwarnings(error)'


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