Python3

Sorry about the late PR, forgot to run the test suite before.

Perhaps a better target would be a separate python3 branch?