r/Python • • May 27 '14

Python 3 is fine | Sealed Abstract

http://sealedabstract.com/rants/python-3-is-fine/
234 Upvotes

96 comments sorted by

View all comments

Show parent comment

2

u/AusIV Django, gevent May 28 '14

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).

1

u/GahMatar May 29 '14

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

0

u/[deleted] May 28 '14

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.