Port to Python 3.

I just made this port with @maikhoepfel.

Tests don't pass with the dev version of Oscar but that appears to be related to changes in Oscar.