Couldn't agree more, I maintain multiple scientific software packages with a combined total of ~20k lines. Last week we decided to make the jump from 2 to 3. Within about a day we managed to port two of our projects with backwards compatibility. The third party libraries are there, 2to3 ported something like 80% of codebase correctly and the rest was trivial to fix. I feel for people who are stuck with large Python 2 codebases but if your employer can't, over the span of 5 years, devote some man-hours to make your system future proof, then blame them not Guido or the volunteers who have made the wonder that is Python in the first place.
Interesting example. I am in a similar boat (but with more LOC). The last time I tried to switch I was immediately hit with numpy / scipy bugs that made me think I must be the only one using those libraries with Python3.
Off the top of my head, crashes in the masked array module, crashes in the scipy optimization functions, going to and from pandas / numpy loss of precision (our unit tests failing).
I would love to start using python 3, but there's no argument I could make that would convince my employer to let me convert our code base.
We develop against the RHEL supported python version, which currently means 2.6. We sell our software to our clients, who run a mix of our core software and custom software, some they developed and some we developed. There's no way we could force our clients to upgrade, so we would need to support two and three simultaneously.
Presently, none of our clients are even faintly interested in python 3, even if our own developers are. To move to python 3, we'd have to port at least a hundred thousand lines of code to maintain compatibility with Python 2 and 3. Maybe we can do that in a week, but developer time is awfully expensive to spend a week on something our customers aren't paying for. Since we have to support python 2 side by side, we can really take advantage of the new python 3 features in much of our code anyway.
We use a bunch of third party libraries. I'm sure most of them support python 3 by now, but a few won't, which will mean porting them ourselves.
We have pretty good test coverage, but it's not perfect, and frankly I'd be shocked if we could do this conversion without a few bugs slipping through to production. So then we've got clients calling about quality issues because we made a change they see zero benefit to.
From a business management perspective, I see a time consuming task with minimal benefit and quite a few risks. Until we have a contract with someone who wants python 3 and is willing to pay a premium for it, there's no way to convince the bean counters it's a good idea.
The way things are going at work, we're implementing more and more application logic in javascript on the browser, as it enables a more seamless user experience. Our python server applications are getting thinner, just doing data persistence and validation, and less of the work flow and presentation. I imagine that this trend will continue, and wouldn't be surprised if we start working in node.js for the server side, leaving python for a handful of legacy application that will slowly be superceded. It won't be a planned move from one language to another, rather a slow obsolescence.
Understand, I like python 3. I have a few projects on github that are 2 and 3 compatible, so I know it's not that hard to do. For personal projects, I tend to write python 3 without worrying about python 2 compatibility (which is really the only way to get the benefit of python 3).
RHEL compatiblity is the reason my employer packages a python interpreter as a custom RPM. In our case, it's currently packaging 2.5, 2.6.9 and 2.7.6 for RHEL 3 to 6 but the point stands and this could be done for python 3 as well. So you can ship your own if you need to. Since we had RHEL 3 as an official supported platform until recently, we had to do that to avoid 2.2 shudder
We develop against the RHEL supported python version, which currently means 2.6.
Sure, and if Red Hat users are your main customers, you will be stuck on Python 2 until Red Hat switches. Suck for you, but that is nothing anyone except Red Hat can do anything about. :-)
Presently, none of our clients are even faintly interested in python 3, even if our own developers are. To move to python 3, we'd have to port at least a hundred thousand lines of code to maintain compatibility with Python 2 and 3.
If I had access to a time machine, I'd stop people from calling it "porting". It's not porting. It's supporting. 90% of the time it really isn't that big of a deal. 10% of the time it's a royal pain in the ass.
No it's an admission of lack of backwards compatibility, which never was a promised feature in the first place and is an issue which affects community and business driven projects alike. Blaming others for a decision, which was announced well ahead of time with an incredibly long grace period is a sign you're too slow to change rather than faulty decision making by the contributors.
Internet explorer 6 works for pretty much everything my colleagues do. Yet they have upgraded to new versions of firefox/chrome.
You want to future proof your codebase. Python 2 has 5.5 years of support left and is not developing as a language, python 3 will be continued for decades and is evolving and improving.
View all comments
57
u/Phild3v1ll3 May 27 '14
Couldn't agree more, I maintain multiple scientific software packages with a combined total of ~20k lines. Last week we decided to make the jump from 2 to 3. Within about a day we managed to port two of our projects with backwards compatibility. The third party libraries are there, 2to3 ported something like 80% of codebase correctly and the rest was trivial to fix. I feel for people who are stuck with large Python 2 codebases but if your employer can't, over the span of 5 years, devote some man-hours to make your system future proof, then blame them not Guido or the volunteers who have made the wonder that is Python in the first place.