After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657666 - Use GLib, GObject from gi.repository instead of glib, gobject
Use GLib, GObject from gi.repository instead of glib, gobject
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-30 05:29 UTC by Alexandre Rostovtsev
Modified: 2011-08-31 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to use GLib and GObject from gi.repository (11.78 KB, patch)
2011-08-30 05:33 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2011-08-30 05:29:51 UTC
Caribou should use GLib and GObject from gi.repository instead of glib and gobject modules for compatibility with pygobject-3.0. Otherwise, when running on
a system that has pygobject-2.0 and pygobject-3.0 installed, caribou-preferences fails with

Traceback (most recent call last):
  • File "<string>", line 5 in <module>
  • File "/usr/lib/python2.7/site-packages/caribou/settings/__init__.py", line 3 in <module>
    from caribou_settings import CaribouSettings
  • File "/usr/lib/python2.7/site-packages/caribou/settings/caribou_settings.py", line 1 in <module>
    from caribou.settings.setting_types import *
  • File "/usr/lib/python2.7/site-packages/caribou/settings/setting_types.py", line 2 in <module>
    from gi.repository import GLib
  • File "/usr/lib/python2.7/site-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".',))

Comment 1 Alexandre Rostovtsev 2011-08-30 05:33:20 UTC
Created attachment 195154 [details] [review]
patch to use GLib and GObject from gi.repository
Comment 2 Eitan Isaacson 2011-08-31 16:19:12 UTC
Comment on attachment 195154 [details] [review]
patch to use GLib and GObject from gi.repository

Thank you!