Use single codebase for Python 2 and Python 3