python wnck bindings have broken constants again

Bug #642913 reported by Tony Houghton
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Gnome Python Desktop
Won't Fix
Medium
gnome-python-desktop (Debian)
Won't Fix
Medium
gnome-python-desktop (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Bug 447479 got fixed in libwnck (the constants should have been registered as flags, not as enums) but a workaround also got put in to python's wnck bindings (register constants as enum instead of flags). So this has created a sort of mirror image of the original bug with effectively the same symptoms.

Fixed on natty; needs back-porting for any supported release where doing:

  python -c "import wnck"

produces a warning or error.

TEST CASE:
0. install python-wnck
1. run python -c "import wnck"
2. verify what you get a WARNING
3. install python-wnck from -proposed
4. repeat (1)
5. verify that this time there is no warning

Revision history for this message
Tony Houghton (h-realh) wrote :
Changed in gnome-python-desktop:
importance: Unknown → Medium
status: Unknown → New
tags: added: patch
Changed in gnome-python-desktop (Debian):
status: Unknown → Fix Released
Revision history for this message
Tony Houghton (h-realh) wrote :

I've added fixed versions to my PPA for anyone who can't wait for the fix to be released officially.

ppa:h-realh/ppa

There are versions for lucid and maverick.

Revision history for this message
Stefano Rivera (stefanor) wrote :

IIRC like this was fixed in 2.30.0-3ubuntu1 (don't know why I didn't close this bug)

  * Merge from Debian unstable (LP: #403078). Remaining changes:
    - debian/control:
      + Remove bug-buddy build-depend
      + Add Vcs-Bzr link
      + python-evince suggest evince
      + Replace libevince-dev (which does not exist in Ubuntu) with our split
        libevview-dev/libevdocument-dev.
      + Add libtool build dependency.
    - debian/rules:
      + Run autotools on build
    - debian/python-evince.examples:
      + Add examples for evince
    - debian/watch:
      + Watch unstable series
    - 90_autotools.patch:
      + Not required, autotools now run on build
    - evince-2.32.patch:
      + To build against current evince.
  * Dropped changes:
    - Use Ubuntu version for gnome-python-desktop conflicts, predates lucid.
  * debian/patches/01_wnck_enums.patch:
    - Patch from upstream bugzilla, fix flags in the wnck module that were
      declared as enums. Closes: #597414.
  * debian/control.in:
    - Build depend on libgnome-media-dev on Hurd now that it's built there.
      Thus build the python-mediaprofiles package.
    - Build depend on bug-buddy on Hurd too since it's built there now.
  * Use Replaces instead of Conflicts to ease APT finding the correct
    upgrade path.

Changed in gnome-python-desktop (Ubuntu):
status: New → Fix Released
Revision history for this message
Vladimir Kolev (vladimir.kolev) wrote :

Well this bug is still present on Ubuntu 10.04.2 LTS

Here the information:
Python version: Python 2.6.5

Package used python-wnck 2.30.0-0ubuntu1

Package: python-wnck
Priority: optional
Section: python
Installed-Size: 156
Maintainer: Ubuntu Desktop Team <email address hidden>
Original-Maintainer: Loic Minier <email address hidden>
Architecture: i386
Source: gnome-python-desktop
Version: 2.30.0-0ubuntu1
Depends: libatk1.0-0 (>= 1.29.3), libc6 (>= 2.3.6-6~), libcairo2 (>= 1.2.4), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.8.0), libpango1.0-0 (>= 1.14.0), libwnck22 (>= 2.22.0), zlib1g (>= 1:1.1.4), python (<< 2.7), python (>= 2.6), python-support (>= 0.90.0), python-gtk2
Conflicts: python-gnome2-desktop (<< 2.26.0-0ubuntu3)
Filename: pool/main/g/gnome-python-desktop/python-wnck_2.30.0-0ubuntu1_i386.deb
Size: 47174
MD5sum: df81343927ea7f01b7cb43a2325f0c8f
SHA1: 4709e63c9c86c799d59a2ebe22ed4244cf0102fd
SHA256: 96f5533ac295df352603c542d099bd245066f8a1043aa00386f7149a38b01c48
Description: Python bindings for the WNCK library
 This package contains a module that allows to communicate with the
 Window Manager using the EWMH specification from Python applications.
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
Task: ubuntu-desktop, edubuntu-desktop, ubuntu-netbook

Error when importing wnck:

python -c "import wnck"

** (-c:30723): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (-c:30723): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (-c:30723): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'

Revision history for this message
Stefano Rivera (stefanor) wrote :

SRU Test:
run python -c "import wnck"

If you see WARNINGs about enums, your python-wnck is broken. If you see no output at all, this bug is fixed.

Revision history for this message
Stefano Rivera (stefanor) wrote :
Revision history for this message
Stefano Rivera (stefanor) wrote :
Paul Sladen (sladen)
description: updated
Changed in gnome-python-desktop (Ubuntu Lucid):
status: New → Triaged
Changed in gnome-python-desktop (Ubuntu Maverick):
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :

Uploaded to {lucid,maverick}-proposed now, waiting for approval.

description: updated
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

APPROVED: after review, this package is acceptable for lucid-proposed.

Changed in gnome-python-desktop (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Accepted gnome-python-desktop into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

APPROVED: after review, this package is acceptable for maverick-proposed.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted gnome-python-desktop into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-python-desktop (Ubuntu Maverick):
status: Triaged → Fix Committed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've followed the test case and verified the proposed package on both Lucid and Maverick and can confirm that the proposed package indeed fix the issue on both releases, marking this as verification-done, thanks all.

tags: added: verification-done
removed: verification-needed
Changed in gnome-python-desktop (Debian):
status: Fix Released → Unknown
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-python-desktop - 2.30.0-0ubuntu1.1

---------------
gnome-python-desktop (2.30.0-0ubuntu1.1) lucid-proposed; urgency=low

  * 01_wnck_enums.patch: Patch from upstream bugzilla, fix flags in the wnck
    module that were declared as enums. (LP: #642913)
 -- Stefano Rivera <email address hidden> Sat, 12 Mar 2011 23:49:57 +0200

Changed in gnome-python-desktop (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-python-desktop - 2.30.0-1ubuntu5.1

---------------
gnome-python-desktop (2.30.0-1ubuntu5.1) maverick-proposed; urgency=low

  * 01_wnck_enums.patch: Patch from upstream bugzilla, fix flags in the wnck
    module that were declared as enums. (LP: #642913)
 -- Stefano Rivera <email address hidden> Sat, 12 Mar 2011 23:55:41 +0200

Changed in gnome-python-desktop (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
Changed in gnome-python-desktop:
status: New → Won't Fix
Changed in gnome-python-desktop (Debian):
importance: Unknown → Medium
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.