How to stop worrying and love Python 3
Firstly, unless you are the maintainer of a python library, there is no, I repeat no, reason for you to port to Python 3 right now except that you probably will like it better. That’s it. Python 3 is a amazing language, but Python 2 is still great! If you are happy with Python 2, you can ignore Python 3 and continue as normal. It will take some time before even most Linux distros come with Python 3, dot-zero releases always have bugs, etc, etc. There will come a time where there are more reasons. I’d expect that in a year or so we’ll start getting Python 3 only libraries and stuff. But right now, there is no reason.
Secondly, porting to Python 3 is not so painful as you might be led to believe som from the discussion. 2to3 works fine. I did some testing by runnig a highly complex and magical piece of software through 2to3 in august, namely setuptools. Sure, it didn’t work straight out of the box, but I did get it working. The big problem was that setuptools mixes binary and string data in it’s filehandling. It opens files without either a text or a binary flag, because in python 2.x that flag doens’t actually do anything, and then looks to see if it’s binary or string data by looking at the start of the file. That part needs to be rewritten. I got it, and buildout, running it’s tests and seemingly working with a couple of hours of quick and dirty fixes. Other than that, it worked. 99% of Python software will require that level or lower of TLC after conversion, and converting to Python 3 will for a software project of typical sizes be about a days work, I guess. And the people that needs to port early is going to write documentation for you to help you. So don’t worry. The problem is if you need to support Python 2.5 and Python 3 from the same codebase, because then you will want to modify your 2.5 code so that the 2to3 conversion works without you needing to make any changes to the code afterwards. That’s a bit more work.
Thirdly, it’s perfectly possible to write code that works under both 2.6 and 3.0 without conversion. Yes, I know the whatsnew document doesn’t recommend that, but that document is seriously outdated, and for example claims that you can’t use print. This is incorrect, there if since a long time ago a future import that deals with that in 2.6. And before you need to port to 3.0 there will probably be a 2.7 out, with even more forward compatibility. Most software projects out there doesn’t need to support more than one Python version at a time. Those who do, that is libraries and framework plugins, can for the most part move to 3.0 gradually and support two Python versions at the same time.
So, the conclusion is, Python 3 is not scary, it’s not so incompatible as you think, and I do not think it’s going to split the community. That was a serious worry two years ago, but those who raised that worry, like me and Martijn Faassen, was listened to, and 2.6 has serious amounts of backwards compatibility. So take it easy, it’s going to be fine!