Bug 623852 - gtk-vnc indirectly uses PyCObject API (deprecated in Python 2.7)
gtk-vnc indirectly uses PyCObject API (deprecated in Python 2.7)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gtk-vnc (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On: 621887 623844
Blocks: PyCObject
  Show dependency treegraph
 
Reported: 2010-08-12 20:43 EDT by Dave Malcolm
Modified: 2010-11-08 05:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-08 05:11:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2010-08-12 20:43:20 EDT
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 Berrange 2010-08-12 22:51:13 EDT
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.