Merge lp://qastaging/~sinzui/bzr-dbus/gtk3-support into lp://qastaging/bzr-dbus

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 52
Proposed branch: lp://qastaging/~sinzui/bzr-dbus/gtk3-support
Merge into: lp://qastaging/bzr-dbus
Diff against target: 305 lines (+68/-34)
3 files modified
activity.py (+8/-6)
setup.py (+32/-4)
tests/test_activity.py (+28/-24)
To merge this branch: bzr merge lp://qastaging/~sinzui/bzr-dbus/gtk3-support
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+90952@code.qastaging.launchpad.net

Description of the change

Update bzr-dbus to work with gtk3.

I see this error when I run gci from the command line or from
gedit-developer-plugins:

/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

This is harmless from the command line, but when the code is embedded,
the whole app becomes unstable and is likely to crash the next time any
call to bzr-gtk is made.

I traced the issue to an import of gobject in bzr-dbus:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 919, in exception_to_return_code
...
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/dbus/activity.py", line 29, in <module>
    import gobject
  File "/usr/lib/python2.7/dist-packages/gobject/__init__.py", line 47, in <module>
    from gobject.constants import *

--------------------------------------------------------------------

RULES

    * Try to import from gi.repository and fallback for gobject.
    * Update the existing calls to gobject to use GObject, the
      three member calls are compatible with GObject.
    * ADDENDUM
      * Added a 'check' command to setup.py to run the tests
      * tests.test_activity.TestActivity.test_server fails in
        trunk and my branch. I do not know what I can do to fix
        the test or the code to make it pass. The server fails to
        start.`

QA

    * Using bzr-gtk trunk run `bzr gci` in a tree with changes.
    * Verify a warnging is not displayed on the commmand line
      Warning: g_boxed_type_register_static: ...

TEST

    ./setup.py check

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks again Curtis!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: