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
	('com.example.HelloWorld',)
	>>> proxy.dbus_methods
	('com.example.HelloWorld.SayHelloTo',)
	>>> proxy.dbus_signals
	('com.example.HelloWorld.Greeting',)
	>>> iface = dbus.Interface(proxy, 'com.example.HelloWorld')
	>>> # method SayHelloTo(s: person) -> nothing
	>>> iface.dbus_methods
	('SayHelloTo',)
	>>> iface.SayHelloTo.in_signature
	dbus.Signature('s')
	>>> iface.SayHelloTo.out_signature
	dbus.Signature('')
	>>> iface.SayHelloTo.annotations
	{'com.example.Annotated': 'yes'}
	>>> iface.dbus_signals
	>>> # signal Greeting(s: message)
	('Greeting',)
	>>> iface.Greeting.signature
	dbus.Signature('s')
	>>> iface.Greeting.annotations
	{'com.example.Annotated': 'yes'}
	>>> iface.dbus_nodes
	('/SubObject', '/OtherObject')

Thoughts?
	Simon


More information about the dbus mailing list