Support Python 3
Issue #6
resolved
We should probably also maintain compatibility with py2, at least for now. Two common options seem to be to use python-future and python-six. The general impression I have is that python-six is good for maintaining compatibility with pre-2.6 Python (which we don't need) and making py2 code work in py3. In contrast, python-future seems more geared at writing py3 code which will then also run in py2, which seems like the better option, as this will hopefully make eventually dropping py2 smoother.
Comments (4)
-
-
@smithrb, is it fair to say we should just convert the codebase to work with Python 3 and drop Python 2 compatibility?
-
reporter Yes, I think that's the right approach.
-
reporter - changed status to resolved
- Log in to comment
I think It is worth the trouble to poll users to see how many are still using Python 2 and how many of these Python 2 users have strong objections to migrating their codebases to Python 3. Because Python 2 support will eventually be dropped in 2020, if we can drop it now, it saves us time from creating and maintaining compatibility with Python 2 and also saves users' time from migrating their Python 2 codebases, whose sizes and complexities will only increase in time if said users insist on using only Python 2, to work in Python 3 when official support for Python 2 is dropped in 2020.
If we do not need to support Python 2, we can just run
2to3
on all the files, which should suffice. See https://docs.python.org/3/library/2to3.html for details.