Python 2 is in maintenance mode so it will not see any future development. The world is therefore gradually switching over to Python 3 instead. The distributions are also trying to avoid shipping Python 2 at all (see bug 4586). Upstream plans to EOL Python 2 in May 2015. Since Python 2 is a dead end we should look at migrating to Python 3. The question is when though. Relevant factors: - Which distributions lack an easy way of installing Python 3? - Which ship with Python 3 by default? - Which ship with Python 2 by default? There will probably never be a perfect time for this migration as there will likely be a period where there are relevant distributions that have only Python 2 by default, and other that only have Python 3 by default.
Another thing to consider is if the external projects that we depend on have been converted to Python 3. E.g. Cheetah seems to have been abandoned and other users are switching to other template engines for Python 3.
https://lwn.net/Articles/729366/
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2017-December/001234.html
A few notes from my Python 3 adventures: Porting to Python 3 is easier if we avoid using modules that are deprecated already in Python 2. This branch changes our code to use email instead of rfc822 and hashlib over sha/md5. http://git.cendio.se/cgit/~derfian/thinlinc.git/log/?h=stop-using-deprecated-python-modules Using the __future__ module in Python 2.6 onwards would allow us to modify our code to be more future-compatible. Two major things: > from __future__ import print_function This allows us to move to print-as-a-function rather than print-as-a-statement with our code. > from __future__ import absolute_import This one is so nice I want to use it regardless if we're porting to Python 3 or not. Require relative imports to be explicitly marked as such, making it a breeze to see whether an import is supposed to be from a system module or a sibling. Bad: > from xmlrpc import XMLRPCChannel # implicit relative Good: > from .xmlrpc import XMLRPCChannel # explicit relative > from thinlinc.vsm.xmlrpc import XMLRPCChannel # absolute
*** This bug has been marked as a duplicate of bug 4586 ***