6 ms·
I get that enterprise-y stuff is on a more LTS slow schedule, but: Python 3 was released a DECADE ago - literally. If you've got mission critical stuff running
by Havoc 7y ago
I get that enterprise-y stuff is on a more LTS slow schedule, but:
Python 3 was released a DECADE ago - literally. If you've got mission critical stuff running on Python 2 and are panicking now then it's time re-evaluate your life choices.
- devnonymous 7y agoNot that I'm against python 3 but please, this dismissive arrogant attitude says more about your experience with python than of people who took their time. Python until at least 3.4 was changing way too fast to be considered as a stable platform to port to. The actual window for migration has been more like 3-5 years. Yes this has been sufficient but not so long that people need to question their life choices for being cautions.
- Havoc 7y ago>The actual window for migration has been more like 3-5 years. Fair - the 2-->3 transition was indeed painful. So 3-5 years actual migration window, with advance notice of "Python3 is coming of another 7-5 years". Whichever way you look at it - that's a decade advance notice. In a industry that moves exceptionally fast. If you want to judge me as "dismissive arrogant attitude" for that - so be it. >people need to question their life choices for being cautions. The life choices phrasing was a poor choice on my part & I apologize for that. Message is unchanged though. To me waiting till support window runs out and then thinking of next step is the exact opposite of "being cautious".
- kortilla 7y ago>and then thinking of next step is the exact opposite of "being cautious". I don’t think you fully grok the risk of code changes in some of these large legacy systems. EOL with no security patches on a closed system that processes trusted inputs is nearly 0-risk.
- Havoc 7y ago>fully grok the risk Oh I get the risk. What I don't get is someone sitting on this for a decade and at EOL starting to wonder how this is gonna work. >nearly 0-risk That's cool to. I mean there are *nix servers with years of uptime that haven't seen a proper update since ever. All good (sorta). I coded in Python 2 last week - nothing against it. It's the bizarre "this decade long transition just snuck up on us" tone of the question that gets me.
- Twirrim 7y agoYou're operating from the assumption that people own their own code base, and are actually in a position to deal with that migration. It's a nice bubble you live in, but it is a bubble. There is a lot of industry specific software out there that runs on all sorts of odds and ends of versions of stuff. Some critical software for a particular industry I'm aware of, still relies on CentOS 4, for example. It can't cope, and isn't certified to run on anything newer. The end users often find their hands tied, because there's only one vendor producing software that fits their needs, and those vendors rarely give much of a damn about their end users running out of date software that doesn't get any security patches.
- Havoc 7y agoSure - poor players are totally OK with rocking ancient version. Such is life. That shouldn't turn into a "so redhat why the hell aren't you supporting decade old tech". The solution here is to shout at the shitty suppliers not crap on redhat for their (reasonable) support cycles.
- danudey 7y agoIn fairness to those developers (of which I was one): Python 3 was released a decade ago, and support for Python 3 in commonly used libraries was released, depending on the library, some time between a decade ago and "not yet". This has required a lot of engineering work to make libraries function with Python 2 and Python 3 (e.g. pandas, numpy, scipy), to make frameworks work properly on both (e.g. django), and to ensure that the libraries that everything relies on (e.g. mysqldb) get updated, forked, or replaced with rewritten alternatives. Sure, I as a developer "should have" been writing Python 3 for the last ten years, but for most of those years it would have required rewriting large libraries that I, and other developers, rely on to be productive. Unfortunately this has meant that instead of starting Python 3 projects over the last ten years, people have been starting Python 2 projects so that they could get their work done in those intervening years.
- TylerE 7y agoEven ignoring the lib issue, there were major performance regressions. Py3 didn’t really become clearly better until at least 3.4.
- melling 7y agoThat was 5 years ago. I don’t do a lot of Python, and have been exclusively using v3, but I thought you could make your Python 2 somewhat compatible with v3 by using libraries, etc. How close can you come to a Python code base that runs in v2 and v3?
- joshuamorton 7y ago> How close can you come to a Python code base that runs in v2 and v3? Using the `six` module, this is (nearly) trivial for 99% of code. If you're doing certain weird things, its more difficult but possible. (I say this having done py2-3 conversion or dual support for lots of vanilla code, as well as a significant amount of weird code: c/c++ extensions and code that uses advanced features like code object introspection and dynamic imports/rewriting/etc).
- rolltiide 7y agoThis argument fails when you think of Python2 and Python3 as two distinct languages coincidentally having the same brand name
- ASalazarMX 7y agoThen it doesn't fail. They're nearly identical, it's not like one is Java and the other JavaScript.
- loeg 7y agoTotally. If you've got a legacy Python2 codebase, I'd encourage taking a long hard look at porting to a non-Python family language as an alternative. It's not going to be right for everyone, but it's worth keeping in mind.
- guitarbill 7y agowell, in theory you're right, but it isn't like the transition from python 2 to 3 requires a complete rewrite. it was fairly easy to write (mostly) compatible code, via __future__, u"", and maybe six. it's a bit unrealistic to think that if someone hasn't put the effort in to do that, they'll expend the effort on porting it to a different language, unless it also makes sense for other reasons
- loeg 7y agoDepends how good your test coverage is, I guess. The legacy Py2 codebase I have the most familiarity with is probably more than 50% C extensions with zero tests, and migrating those to Python 3 correctly is non-trivial. If you've now got to write a bunch of tests, you might as well test a reimplementation in a language with a history of more API stability.
- guitarbill 7y agoi hear you, but at that point, it isn't really a Python codebase. i think that qualifies as a good reason to migrate away from Python, since if you've ended up with that many C extensions, Python probably wasn't the best fit to begin with. bitching about unicode, the print function, etc, i'm less sympathetic. the only thing that's weird to me is if you have C extensions, it's super easy writing tests for those in Python. getting coverage is possible via gcov/lcov. retrofitting tests is hard and painful in any language, period. but so is a rewrite. pick your poison.
- djhaskin987 7y agoI use ansible heavily at work which doesn't really support python 3 very well yet. If it were an app I wrote from scratchthe choice would be esi but not all the code I work with and rely on (like ansible) was written recently or is easy to migrate.
- nitzmahone 7y agoNot sure what you mean by "doesn't support python 3 very well yet"- Ansible has had support and testing for Python 3 since Ansible 2.2, and has been officially support-with-a-capital-S Supported on Python 3 since Ansible 2.5. Using Ansible against Python3-only targets used to require manually setting ansible_python_interpreter in the inventory, but since 2.8 also supports automatic interpreter discovery.
- y4mi 7y agoYou're correct now, but it wasnt officially supported until quite recentlish. I remember reading last year on the official website that the server executing the playbook should be using python 2 And some features such as redis cache were broken on python 3
- Havoc 7y ago>easy to migrate. Yes I understand that. Legacy code is a pain. This transition is a decade in the making though. A decade. Ansible is SEVEN YEARS OLD. This is not a flaw in the python support / timing model. Decade is practically glacial in software terms. Anyone not keeping pace is on their own imo. Fun fact...py2 EOL was initially 2015. This is already the bloody extension...
- bbayles 7y agoSomething to consider: there hasn't been a great way to get Python 3 on RHEL / CentOS until this year. The IUS repo is an option, but it makes distributing a Python 3 package difficult: you have to get EPEL installed, then IUS, then you can finally get your own package in. I'm happy to be able to drop Python 2 support in my projects, but I've had to hold off on some of them that run on RHEL / CentOS.
- orev 7y agoWhat the situation really highlights is this: don’t make breaking changes to things. Perl 6 had to learn this lesson too. Linux’s staying power has a lot to do with the policy of “don’t break user-space”
- stefan_ 7y agoYeah, and somehow they managed to make versions of Python 3 that are practically unusable due to introducing more syntax later. Like good luck running Python <3.6 without string interpolation, released in December 2016. All of this is entirely their fault, particularly with Perl hindsight.
- takeda 7y agoAre you complaining that the language is evolving and provides new features that people want to use?
- tyingq 7y agoDecade old code isn't anywhere near the far end of the scale for old, big companies.