Python 3 support.

At least tentatively, as I have no real actual use case. But tests pass.
I've also used it to port Diazo to Python 3.

Warning: It does drop Python 2.5 support.