[systemd-devel] Future of systemd Python module

Lennart Poettering lennart at poettering.net
Tue Jan 22 13:40:37 PST 2013


On Tue, 22.01.13 08:43, George McCollister (george.mccollister at gmail.com) wrote:

> Are there plans (or desire) to expand the Python module included
> with systemd beyond Journal? Is there desire to replicate or wrap
> functionality provided by the DBUS API or is this beyond the design
> scope of this module?

I'd definitely welcome further additions, in particular for providing
nice interfaces to the C APIs and suchlike.

Regarding the idea of wrapping D-Bus APIs I am not too warm though. We
had the question of creating C libraries for wrapping D-Bus APIs in
GNOME upstream a few years ago, and we all came to the conclusion that
instead of writing those we should rather make the D-Bus python glue
nicer. The result of that was that GLib's "gdbus" stuff is nowadays
substantially easier to use then the old libdbus bindings. A similar
story is probably not only true for C but for Python, too.

Simple 1:1 mappings of D-Bus/Python calls add a substantial amount of
code and are really hard to keep updated. They add another layer we have
to take care for and that complicates our stack.

I mean, I am not up-to-date what the state of D-Bus API glue for Python
is, but I am tempted to say that the preferred way to contact the
systemd bus APIs is probably by directly using the D-Bus API glue for
Python rather than any module in between.

All this only really applies to the D-Bus APIs. For everything else,
like the C APIs and things, I'd welcome all additions to make Python
integration nicer.

(Note though that my own Python skills are a bit rusty, and if in doubt
I'd always defer to David Strauss and folks to make the ultimate call on
Python code in systemd.)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list