But let us instead celebrate gobject-introspection.
While there has been no official announcement, I think it’s probably time we declared telepathy-python to have passed away. Deprecated. In the great attic of the sky.
The python-telepathy client-side bindings have been in a state of disrepair for a long time now, not able to do the heavy lifting that other bindings such as tp-glib and tp-qt4 have been focusing on.
telepathy-butterfly is not really maintained, isn’t supported properly by empathy master, and is looking to be replaced in the future by the MSN Live XMPP support. In the meantime bug #663829 migrates existing butterfly accounts to telepathy-haze. I’m not sure about telepathy-sunshine, but I suspect it also won’t work with the latest Empathy.
Through work I started, and a bunch of other people have continued, telepathy-glib client-side bindings have been growing increasingly more introspectable as time passes. This is now used by gnome-shell, and it works pretty well.
Since someone asked today, here’s how you set your global presence in Python:
from gi.repository import TelepathyGLib as Tp from gi.repository import GObject loop = GObject.MainLoop() am = Tp.AccountManager.dup() am.prepare_async(None, lambda *args: loop.quit(), None) loop.run() am.set_all_requested_presences(Tp.ConnectionPresenceType.AVAILABLE, 'available', 'Set by script')
Unfortunately we can’t introspect the service-side bindings, they do some things that are very creative and clever, but that gobject-introspection just doesn’t understand. Which means you can’t write a CM using PyGObject yet. The solution, I think, is likely to come with a future, GVariant-based telepathy-glib, but I’m still trying to figure out how we can make things (like mixins) work in a way that g-i can understand.
telepathy-sunshine is probably not maintained anymore. I use Debian Squeeze, and I must say, that I was forced to use telepathy-haze (Pidgin plugin) to use GG protocol correctly. Because on previous mentioned plugin connection from time to time was lost.
telepathy-sunshine is not supported because of deprecated telepathy-python bindings and lack of my time to work on C-based CM. I’ve tried to rewrite sunshine to C but it’s like hell for me. A lot of genmarshal shits and strange hacks etc., and any how-to how to start. Boilerplate is much appreciated here I think (Pidgin have for example null-plugin here and easy info how to write your very own plugin). Writting any plugin for Pidgin is still a lot easier than for Telepathy AFAIK and I think that most of people agree with me.
That’s why theres just CM’s officialy supported by Collabora. I don’t have much time to work on sunshine and telepathy-python is dead so what I could do? I don’t want to spend 6 months to rewrite CM 🙂
I wanted to write it using Qt and C++ (which is really fun!) but sadly telepathy-qt4 is not supporting writting CM’s using it and (AFAIK) won’t be.
I hope that someday geat times will come and there will be libraries for other languages too 🙂
Yeah, it’s hard if you don’t understand GObject. I don’t think there are too many “strange hacks” though.
The best examples for writing a CM are probably the tests in tp-glib, which show off instantiating each kind of object. Besides that, probably the CMs themselves.
I imagine writing a Pidgin plugin will be easier than writing a Telepathy CM. One of the costs of modularisation is everything gets a lot more complex, has to be marshalled, etc. Also, because of the flexibility of Telepathy, there’s a lot more things that need to be done, you’re not just providing method calls for a UI.