Python dbus port for python3.x

Barry Warsaw barry at python.org
Thu Dec 8 05:06:22 PST 2011


On Dec 01, 2011, at 02:54 PM, Barry Warsaw wrote:

>On Dec 01, 2011, at 02:05 PM, Gaurav Sood wrote:
>
>>Has python dbus has been ported to python 3.x. If not are there any plans
>>to do it in near future.
>
>Yes, I'm working on one.

I've uploaded a new patch to the tracker issue.  This adopts Simon's opinion
that object paths and such should be unicodes instead of bytes.  It turns out
that that also simplifies the number of changes needed on the Python side of
things.  The C code grows a little more complex, but not unreasonably so, and
I'll trade C complexity (which users don't see) for Python complexity (which
would affect user code) any day.

Unfortunately, I tried to push to github, but it seems to hate me :).  Along
with the unified diff in the tracker, you can grab the bzr branch:

    $ bzr branch lp:~barry/python-dbus/py3k-works

I'll be sure to keep the tracker up-to-date with the bzr branch.

This builds and runs the test suite[1] against Python 2.6, 2.7, and 3.2 (I'm
still testing it against unreleased Python 3.3).  I've had one small bug
report emailed to me about a compilation problem in UnixFd_tp_new() but I
cannot reproduce it on Ubuntu 11.10 with gcc 4.6.1.  It's an easy fix though
if it happens to you.

If you try it, please let me know either in private email or on this list what
you think.  I will be building a binary package for Ubuntu into one of my PPAs
soon, and then I'll be working on porting some dbus applications.

Cheers,
-Barry

[1] I still have NFC about the problem in bug 43303, so I've disabled those
tests for now in my patch. :(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20111208/e0d0b105/attachment.pgp>


More information about the dbus mailing list