← Back to team overview

desktop-packages team mailing list archive

[Bug 829186] Re: Mixes static and GI library bindings

 

For ubiquity's xklavier usage, it seems that this isn't working at all
right now. With the existing pygobject 2.28 on oneiric, when I do

>>> from gi.repository import Gdk
>>> import xklavier
>>> display = Gdk.Display.get_default()
>>> engine = xklavier.Engine(display)
__main__:1: Warning: cannot register existing type `GdkDisplay'
__main__:1: Warning: g_once_init_leave: assertion `initialization_value != 0' failed
__main__:1: invalid cast from `GdkX11Display' to `invalid'

and then it hangs eternally. When I run the same with pygobject 2.90, I
get

>>> from gi.repository import Gdk
>>> import xklavier
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
>>> display = Gdk.Display.get_default()
>>> engine = xklavier.Engine(display)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: must be gobject.GObject, not gtk.gdk.X11Display

However, even if that would work, ubiquity's set_indicator_keymaps()
currently uses gconf, but the current GNOME desktop uses gsettings.

As the function does not seem to work at all in any circumstance now,
would it be ok to disable it for now with

--- ubiquity/misc.py    2011-06-02 10:57:49 +0000
+++ ubiquity/misc.py    2011-08-26 07:23:25 +0000
@@ -561,6 +561,10 @@
     return model

 def set_indicator_keymaps(locale):
+    import warnings
+    warning.warn('set_indicator_keymaps: this function currently does not work')
+    return
+
     import libxml2
     import xklavier
     from gi.repository import Gdk

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gwibber in Ubuntu.
https://bugs.launchpad.net/bugs/829186

Title:
  Mixes static and GI library bindings

Status in Ubuntu Single Sign On Client:
  Fix Released
Status in Ubuntu One Client:
  Fix Released
Status in Ubuntu One Control Panel:
  Fix Released
Status in “gwibber” package in Ubuntu:
  Fix Released
Status in “jockey” package in Ubuntu:
  Fix Released
Status in “oneconf” package in Ubuntu:
  Fix Released
Status in “software-center” package in Ubuntu:
  Fix Released
Status in “ubiquity” package in Ubuntu:
  Triaged
Status in “ubuntu-sso-client” package in Ubuntu:
  Fix Released
Status in “ubuntuone-client” package in Ubuntu:
  Fix Released
Status in “ubuntuone-control-panel” package in Ubuntu:
  Fix Released
Status in “update-manager” package in Ubuntu:
  Fix Released
Status in “usb-creator” package in Ubuntu:
  Fix Released

Bug description:
  This is a tracking bug for fixing programs which will crash with a
  newer pygobject >= 2.90. This is now absolutely zero tolerant against
  importing both the static and the GI version of a particular library.
  This was mostly the case with 2.28 as well, but did work in some cases
  (like "import gobject; from gi.repository import Gtk", in particular
  for "glib" and "gobject"). These now cause errors as well.

  See bug 828751 for some more information for this.

  $ ubuntuone-control-panel-gtk
  Traceback (most recent call last):
    File "/usr/bin/ubuntuone-control-panel-gtk", line 33, in <module>
      from ubuntuone.controlpanel.gui.gtk import main
    File "/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/__init__.py", line 28, in <module>
      from ubuntuone.controlpanel.gui.gtk.gui import main
    File "/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/gui.py", line 39, in <module>
      from gi.repository import GLib
    File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 23, in <module>
      from ._gi import _API, Repository
  ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-sso-client/+bug/829186/+subscriptions