cocagne/txdbus — pull request #12 by geertj (2014-05-12 10:23:54+00:00)
Title: Partial support for Python 3.3+.

This patch adds partial support for Python 3.3+. The following modules are
supported and pass all tests:

* txdbus.message
* txdbus.marshal

This patch alllows asyncio frameworks that support Python 3.x to leverage the
message parsing and marshalling provided by txdbus.

This patch does have some impact on Python 2.x:

* Strings are returned as unicode rather than a str containing a UTF-8 encoded
unicode string. I believe this is more correct. That said, it is a change
from current behavior, and if not desirable it would be pretty easy to
special case Python 2.x not to decode D-BUS strings. (On Python 3.x it is
required as "str" there is the unicode string).
* Unfortunatey this drops support for Python versions <= 2.5. It is not really
feasible to support 2.5 and lower in the same code base as 3.x.

Some other notes:

* This patch includes a test driver "runtests.py" that, depending on the
Python version, will select the right tests to run. On Python 2.x all tests
run, while on 3.x only tests for supported modules run.
* This patch also includes a tox.ini so that tox can be used to run the test
suite on all supported Python version.
* I get an occasional fail in the test "test_get_all_properties". I have no
idea if this is caused by my patch. It would be good if someone with more
Twisted knowledge than me can have a look.