Various more changes to dbus-python
simon.mcvittie at collabora.co.uk
Wed Jan 10 05:31:30 PST 2007
As well as the patch to support switching off introspection in
get_object and get_object_by_unique_name (thanks Ulisses), here are some
changes I've checked into git:
- Added part of a tutorial in doc/tutorial.txt (or really .txt.in, since
the version is filled in by ./configure).
- Don't require a main loop unless the user does something that actually
needs it (async calls, signal connections, exporting objects)
This isn't actually quite strict enough - get_object() now tracks
NameOwnerChanged to follow well-known name ownership changes, but in
the absence of a main loop it won't get the signals - but following
name ownership changes didn't work at all in Pyrex-dbus-python, so
it's not a regression.
- Subscripting a ByteArray gives a 1-character string again (it briefly
gave a Byte, which subtypes int, but least astonishment and all that).
This is backwards-compatible with Pyrex-dbus-python (although not with
earlier release candidates of C-dbus-python!)
- dbus.Interface and dbus.proxies.ProxyObject have a method
get_dbus_method() which you can use to call remote methods with
strange names (__getattr__ for instance). Previously the only way to
get a remote method proxy was by attribute access, which meant certain
remote method names would be shadowed by actual attributes of the
- When serializing objects, if the object has the special attribute
__dbus_object_path__, guess that it's an object path if there's no
signature, and if serializing it as an object path, use the contents
of that attribute. dbus.Interface, ProxyObject and dbus.service.Object
now have that special attribute.
I plan to do another release candidate once I've finished the tutorial,
which will hopefully be the last before 0.80. Is there anything else that
needs to happen before 0.80? Particularly, anything that breaks API?
(Compatible changes can happen later, but I want to make the
incompatible changes all at once so things only have to be ported once.)
More information about the dbus