Pure Python DBus implementation

John (J5) Palmieri johnp at redhat.com
Fri Aug 12 04:38:08 EST 2005


On Sun, 2005-08-07 at 16:10 +0200, Jakub Piotr Cłapa wrote:
> Would anybody be interested in such? I have a working SASL module (with 
> DBUS_COOKIE_SHA1 method implemented), the message protocol and the 
> unmarshaler and would like to know if the whole project would be 
> welcomed by the community or if I only do this for myself.
> It's not perfect but I tried to closely follow the spec and it 
> successfully parses the two messages you get from the bus after 
> connecting and sending Hello (this message alone is currently hardcoded 
> byte by byte because the marshaler is not done yet ;)

Is this necessary?  Decoding the messages in pure python sounds like a
cool project but I have to think this is just duplication.

> A word about 'why':
> - the current bindings are buggy (I send two patches only to discover
>    that the marhshaler fails to handle Dictionaries)

Dictionaries work fine.  What issues are you having? The word buggy
doesn't help me fix the issues.  The whole thing is in flux so when we
reach 1.0 it won't be buggy.  I fail to see how from scratch
implementation will fix the problem that software will have bugs.

> - they are bindings after all so they have a quite big dependency (the C
>    dbus library)

But any system using dbus will have these loaded into shared memory
anyway.

> - they are quite high level and enforce many constraints on how you want
>    to write your program and use the protocol

This is intentional though you can use the low level bindings.  If the
higher level bindings aren't what you need you need to tell me how you
are using them so I can tailor it to your needs or show you a better way
of doing what you want. 

> - the protocol is simple and the marshaled data map well to the Python
>    data types so writing the implementation was quite simple
> - alternative implementation (AFAIK there are no other than mine and the
>    reference) allow to polish the corner cases in the protocol (e.g. the
>    UNIX socket thing I wrote earlier on this list)

I have no objections to an alternate implementation though I do think it
will confuse the end user.  My main concern is you sent two simple
patches and then decided to go off on your own instead of trying to pool
resources and mature the already existing bindings.  Right now I am the
only one working on them with some patches streaming in from other
parties so admittedly I don't always have the time to devote to fixing
everything quickly though they are on my list.  For instance your
problems with DBus types can all be solved with the patch I am doing for
implementing introspection reads.  But that all takes a lot of time
since there is a significant rewrite that needs to be done in the
proxying code.
  
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list