[Telepathy] Type Conversion Error in PyGI tp-glib

Danielle Madeley danielle.madeley at collabora.co.uk
Mon Jun 13 07:04:17 PDT 2011


On Mon, 2011-06-13 at 15:23 +0200, Tomeu Vizoso wrote:

> > I'm I doing something wrong? Or is this a bug?
> 
> PyGObject is auto-converting your Python int into a GValue, but isn't
> choosing the type that the C side expects. What i think should be done
> in this case (other than moving tp-glib from dbus-glib to gdbus) is to
> give PyGObject a hint of what type should the GValue map to, something
> like:
> 
>         "keepalive-interval": GValue(60, GValue.UInt32),
> 
> Unfortunately, I don't think that exists, but would be worth asking to
> the PyGObject community and checking if a ticket already exists in
> bugzilla.gnome.org.

Tomeu is right, this is actually the bug. I was mistakenly confused with
dbus-python.

Tomeu, out of interest would PyGObject handle this better if it was a
GVariant. Now that gjs has gained GVariant support, I think we should
start exposing GVariant-based APIs for gobject-introspection instead of
TpAsv-based ones.

-- 
Danielle Madeley
Software Developer, Collabora Ltd.                  Melbourne, Australia

www.collabora.co.uk



More information about the telepathy mailing list