dbus-python 0.79.93 (= 0.80rc3) release candidate

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Dec 20 06:29:56 PST 2006

On Wed, 20 Dec 2006 at 14:19:39 +0100, Luigi Paioro wrote:
> I've noted that passing from libxml2 to pyexpat you have 
> removed the module dbus.introspect_parser which provided me the 
> process_introspection_data function (I use it).

I was under the impression that process_introspection_data would only be
useful internally. What do you use it for?

The reason for the name change was that the libxml2 and expat versions
briefly existed in parallel during development. I didn't think the
introspect_parser was meant to be public API, hence the new name.
(Please note that it's slightly incompatible too - the old version
wanted unicode input, the new one wants UTF-8 str objects, and
dbus.proxies has been changed accordingly. I can make it backwards-compatibly
accept Unicode if you want.)

I can move it back and make it "official" public API if you need it, but
I'm concerned that it only gives you a small subset of what's in the
introspection - no 'out' argument signatures, no annotations and no
list of sub-nodes.

If the full introspection data would be useful, it seems a better API
to provide it via properties on the proxies, something like:

	>>> proxy = dbus.SessionBus().get_object('com.example.HelloWorld', '/')
	>>> proxy.dbus_interfaces
	>>> proxy.dbus_methods
	>>> proxy.dbus_signals
	>>> iface = dbus.Interface(proxy, 'com.example.HelloWorld')
	>>> # method SayHelloTo(s: person) -> nothing
	>>> iface.dbus_methods
	>>> iface.SayHelloTo.in_signature
	>>> iface.SayHelloTo.out_signature
	>>> iface.SayHelloTo.annotations
	{'com.example.Annotated': 'yes'}
	>>> iface.dbus_signals
	>>> # signal Greeting(s: message)
	>>> iface.Greeting.signature
	>>> iface.Greeting.annotations
	{'com.example.Annotated': 'yes'}
	>>> iface.dbus_nodes
	('/SubObject', '/OtherObject')


More information about the dbus mailing list