Add support to Python 3 with a single codebase