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 675856 - Use GDbus via gobject-introspection instead dbus-python
Use GDbus via gobject-introspection instead dbus-python
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks: 622871 684103
 
 
Reported: 2012-05-11 02:09 UTC by Javier Jardón (IRC: jjardon)
Modified: 2013-01-03 18:18 UTC
See Also:
GNOME target: 3.8
GNOME version: 3.7/3.8


Attachments
a patch (40.97 KB, patch)
2012-12-31 21:14 UTC, Matthias Clasen
reviewed Details | Review

Description Javier Jardón (IRC: jjardon) 2012-05-11 02:09:49 UTC
So we can stop using dbus-glib in GNOME completely (dbus-python depends in dbus-glib)

Also, the dbus-python maintainer said that
"using GDBus via gobject-introspection would be a better long-term solution for GNOME projects"

See https://bugs.freedesktop.org/show_bug.cgi?id=40661#c1
Comment 1 David Zeuthen (not reading bugmail) 2012-08-20 14:49:28 UTC
Are you referring to

 http://git.gnome.org/browse/glib/tree/gio/tests/gdbus-testserver.py?id=2.33.8

I think that's the only place we use it. My answer to that is: sure, we should just rewrite gdbus-testserver in C.

(using GI inside GLib itself gives you boot-strapping problems since GLib and its GIR/typelibs is in another package. Very annoying.)
Comment 2 Matthias Clasen 2012-12-31 21:14:17 UTC
Created attachment 232436 [details] [review]
a patch

Here is a patch that replaces enough of gdbus-testserver.py by C to make the tests pass.
Comment 3 David Zeuthen (not reading bugmail) 2013-01-02 23:05:40 UTC
Review of attachment 232436 [details] [review]:

Looks good to me, thanks for doing this, only two small stylish comments below. If all the tests still pass, I think we should commit it.

::: gio/tests/gdbus-testserver.c
@@ +772,3 @@
+
+  return ret;
+}

Would prefer something like

 g_assert (!g_variant_is_floating (ret));

just to check the invariant that only non-floating GVariant instances are in the hash table.

We should also set @error (suggest G_DBUS_ERROR_FAILED) if there is no property with the given @property_name - otherwise people reading the code will be led to believe that they can just return NULL without setting @error.

@@ +785,3 @@
+{
+  return FALSE;
+}

Should also set @error here.
Comment 4 Matthias Clasen 2013-01-03 18:18:28 UTC
pushed with those changes - no more dbus-python dep