Bug#618557: gi.repository's Gtk.Window() fails with gtk3

chrysn chrysn at fsfe.org
Wed Mar 16 11:12:06 UTC 2011

Package: python-gobject
Version: 2.27.0-2
Severity: normal
Tags: experimental

when trying to create a gtk window using gtk3, i get the following:

>>> from gi.repository import Gtk
>>> w = Gtk.Window()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/module.py", line 234, in __getattr__
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/module.py", line 228, in _import
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/overrides/Gtk.py", line 60, in <module>
    class Editable(Gtk.Editable):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/types.py", line 139, in __init__
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/types.py", line 107, in _setup_vfuncs
TypeError: Class implementing Gtk.Editable should implement the method do_changed()

i have gir1.2-gtk-3.0 installed in version 3.0.2-1. everything works
well with gir1.2-gtk-2.0. it seems to me that pygobject mixes up gtk3
stuff (without any gir1.2-gtk installed, not even the Gtk import works)
with gtk2 stuff (the /gtk-2.0/ part in the backtrace's paths).

at [1] it was pointed out that i could "just comment [the exception in
line 107] out and the overrides should load" -- that indeed makes it
work, i'm just not familiar enough with gtk3 to say how completely it
works, and there is probably a deeper reason to that exception.

i hope the information below is complete; i created this bug report from
a schroot as i have software installed that conflicts with gir1.2 on my
main system.

[1] http://rotty.yi.org/irclogs/gnome/#python/2010-11-17/

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.37-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Shell: /bin/sh linked to /bin/dash

Versions of packages python-gobject depends on:
ii  gir1.2-glib-2.0         0.10.4-1         Introspection data for GLib, GObje
ii  libc6                   2.11.2-11        Embedded GNU C Library: Shared lib
ii  libffi5                 3.0.9-3          Foreign Function Interface library
ii  libgirepository-1.0-1   0.10.4-1         Library for handling GObject intro
ii  libglib2.0-0            2.28.2-1         The GLib library of C routines
ii  python                  2.6.6-3+squeeze5 interactive high-level object-orie
ii  python-support          1.0.11           automated rebuilding support for P

Versions of packages python-gobject recommends:
ii  python-gobject-cairo          2.27.0-2   Python Cairo bindings for the GObj

Versions of packages python-gobject suggests:
pn  python-gobject-dbg            <none>     (no description available)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20110316/f3bb7348/attachment.pgp>

More information about the pkg-gnome-maintainers mailing list