Slashdot Mirror


Why Do Projects Continue To Support Old Python Releases?

On Planet Python, Gregory Szorc asks why many projects continue to support Python releases prior to 2.7, when they are all EOLed (2.4 in 2008, 2.5 in 2011, and 2.6 last October), and Python 2.7 provides a clear upgrade path to Python 3. Quoting: "I think maintainers of Python projects should seriously consider dropping support for Python 2.6 and below. Are there really that many people on systems that don't have Python 2.7 easily available? Why are we Python developers inflicting so much pain on ourselves to support antiquated Python releases? As a data point, I successfully transitioned Firefox's build system from requiring Python 2.5+ to 2.7.3+ and it was relatively pain free." Shortly after posting, other developers responded with their reasons for using older Python releases. First, Rob Galanakis of CCP (EVE Online) explains the difficulties involved in upgrading a mature commercial project embedding Python. Nathan Froyd adds "I think this list of reasons to upgrade misses the larger point in providing software for other people: You do not get to tell your users what to do. ... Maybe those users don’t have sufficient control over their working environments to install a new version of Python. ... Maybe those users rely on certain APIs only available in older versions of Python and don’t wish to take an indeterminate amount of time to rewrite (retest, recertify, etc. etc.) their software. ... Maybe those users are just rationally lazy and don’t want to deal with downloading, configuring, and installing a new version of Python, plus dealing with inevitable fallout, when the old version has worked Just Fine for everything else."

30 of 432 comments (clear)

  1. Wrong question by sjames · · Score: 5, Insightful

    Let's say I have something in python that was developed on python 2.5 and is in maintenance now. The correct question is why would I demand python 2.7 suddenly? Wouldn't that be kinda bone headed of me?

    Why should I do extra work with the express purpose of making my software more demanding in it's requirements?

    1. Re:Wrong question by msauve · · Score: 3, Insightful

      The author, Gregory Szorc, seems confused about what "support" means. What he appears to be complaining about is "Why do projects continue to require old Python releases?" (e.g. he says "I successfully transitioned Firefox's build system from requiring Python 2.5+ to 2.7.3+)

      What does he care if they support older releases, which in no way implies that they won't also work with newer releases. It's the maintainers of those projects who do the work, not him.

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
  2. Change = bugs by mveloso · · Score: 3, Insightful

    Change means bugs. Why would you want to disrupt your production system to fix bugs introduced in a new release? What benefit would there be to you?

    The system is built, and it works. Don't touch it unless you have to, or unless it was designed to be upgradeable.

  3. Because it works. by Animats · · Score: 5, Insightful

    Many Linux distros in wide use still come with Python 2.6 as the stock Python. If you have some little program that needs to be portable, you write for Python 2.6 and test on 2.6 and 2.7.

    People aren't converting to Python 3 for the same reason Perl users aren't converting to Perl 6 - it's different and incompatible. Many third party Python 2.x packages were never ported to Python 3. Some were replaced by new packages with different APIs, which means rewriting code and finding out what's broken in the new packages. Newly written programs tend to be written for Python 3, but much old stuff will never be ported.

  4. RedHat by SoftwareArtist · · Score: 5, Informative

    The Python version included with RHEL 6 (that's the very latest version): 2.6
    The Python version included with RHEL 5 (still widely used): 2.4

    Thank them for forcing us to keep supporting old versions.

    --
    "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
  5. Re:People don't upgrade by Anonymous Coward · · Score: 5, Insightful

    There are lots of people that have installed python (or had it installed), but not as many that are willing to upgrade their python installation to the latest version. The jump to python 3.0 is a little tricky because some code is not compatible (which is why we still have 2.x) so there's lots of software that would break if people upgrade.

    This.

    My job, like most jobs, isn't to code in Python. It's to process data, and Python (be it 2.4, 2.7, or 3.0) just happens to be one of many tools that I use to process said data.

    The fact that some developer might have built what he believes to be a better version of a Python interpreter than the one that ran my code is immaterial. I've got better things to do with my time than rewrite, re-test, and recertify known-good code.

    If changing the first line of my script to #!/usr/local/bin/pythoninterpreterforbusinesscriticalstuff isn't elegant enough for your tastes, that's the Python devs' problem, not mine.

    (If you think I'm annoying to Python devs, wait'll you see the grudge I have for Javashit frameworks and webdevs, who seem fixated on the concept that using HTML5 and Javashit is somehow more important than cross-browser compatibility, and that "cross-browser compatibility" means "all browsers will render it this week, and this week only, because the standard itself is a moving target! Who would want to display static HTML on a browser more than a week old?")

  6. Not surprising by redmid17 · · Score: 3, Insightful
    TFA: ""I think this list of reasons to upgrade misses the larger point in providing software for other people: You do not get to tell your users what to do. ... Maybe those users don’t have sufficient control over their working environments to install a new version of Python. ... Maybe those users rely on certain APIs only available in older versions of Python and don’t wish to take an indeterminate amount of time to rewrite (retest, recertify, etc. etc.) their software. ... Maybe those users are just rationally lazy and don’t want to deal with downloading, configuring, and installing a new version of Python, plus dealing with inevitable fallout, when the old version has worked Just Fine for everything else."

    I'm just going to mirror what this guy said. There's a reason why IE6 was still around *years* after it should have been taken out back and shot. There's a lot of money dumped into these project and applications. I'd make every effort to encourage a transition, but those cost money and time.

  7. Re:People don't upgrade by Trepidity · · Score: 3

    The jump to python 3.0 is a little tricky because some code is not compatible (which is why we still have 2.x) so there's lots of software that would break if people upgrade.

    That much is true, but I read this post as just calling for support for pre-2.7 Python to be dropped, not all of 2.x. Upgrading to 2.7 doesn't introduce the kind of incompatibility that upgrading to 3.0 does.

  8. Turn the question in the right direction by Meeni · · Score: 5, Insightful

    Why doesn't the new version of Python interpreter support older dialects ?

    1. Re:Turn the question in the right direction by shutdown+-p+now · · Score: 4, Informative

      If we're talking about 2.4/5/6 -> 2.7 migration, then the question does not apply, because there's no "older dialect" - it's the same language, albeit with a few minor additions. There are no major breaking changes there. The problem is that you can't be sure that any of the minor changes do not somehow break your program, especially if it relies on something that was never a hard guarantee, and so you need to retest on the new Python version before you can officially declare it supported. This is no different from Java, for example.

      If we're talking about 2.x -> 3.x, then the break is by design. Python 3 is simply a new language, which disposes with a lot of cruft that accumulated over the years in Python 2 (remember, we're talking about something that's 20 years old at this point). It makes it much better for writing new code, but also requires that you port old code, and places an additional burden on library developers to support both (at least for as long as 2.x remains popular).

    2. Re:Turn the question in the right direction by tuffy · · Score: 3, Informative

      Not that. PHP's only real problems are inconsistent naming and parameter order. (Interestingly enough, a problem partially shared by python in spite of PEP 8) Unlike Python, it doesn't suffer from any serious design flaws.

      Is this some kind of joke? Python's use of syntactically-significant whitespace is not in the same league as all the issues PHP has.

      --

      Ita erat quando hic adveni.

  9. Re:Offline side-by-side Python by Anonymous Coward · · Score: 3, Insightful

    Because he doesn't want the support calls headache? Using the RH-provided Python makes it RH's responsibility to support rather than the ISV's.

  10. The Client by XcepticZP · · Score: 3, Insightful

    It's all fine and dandy to switch over to a new version of python. But unless we can justify it to our client, it ain't gonna happen. The client just isn't going to go for it unless they see some measurable/provable benefit to switching. From their point of view it works, and we'd better damn well not touch it. Unfortunately, the codebase has grown over the years, and sloppy developers have come and gone, leaving the rest of us with a brittle codebase that has very little code-coverage. This is most certainly NOT an ideal scenario when it comes to upgrading, as there are too many unknowns. And that's assuming we could get the client's permission, because yes, the code belongs to them.

  11. Blame Jython by Miamicanes · · Score: 4, Informative

    I think a large part of it is due to the convenience of Jython, which makes it really easy to embed Python directly into a Java application as a user scripting engine that doesn't require explicit installation or configuration by the user. I'd go so far as to say that Jython is probably 99% of the reason WHY so many Java apps that support scripting do it via Python instead of some other language.

    Jython only supports 2.x syntax.

    There IS a way to bind a Python interpreter to Java so it can exchange objects directly (py4j), but it still requires separate installation of Python, with all the usual things that can go wrong (and frequently do, at least under Windows), like environment variables, path definitions, etc.

    There's also IronPython, which is another 2.x-only Python that enjoys lots of "automatic" mindshare from Windows developers because it presents itself as the "official Microsoft-blessed .Net CLR Python" for Windows, and everyone remembers that a decade ago, Activestate Perl was the de-facto Perl for anyone running Windows (and eventually, the defacto Perl, period). It's basically abandonware at this point, but ActiveState doesn't go out of its way to make it obvious.

    That said, I'd put most of the blame/credit for 2.x on the non-existence of "Jython 3".

  12. Re:python sucks by shutdown+-p+now · · Score: 5, Informative

    If you are upgrading Python without so much as reading about what 3.x is and how it's different from 2.x, you're probably not qualified to be handling such an upgrade.

    3.x was explicitly declared as a new language with breaking changes all around, so as to get rid of legacy cruft. This information was widely disseminated through all official channels - documentation, mailing lists, changelogs etc - and carried over on unofficial ones, like textbooks. That's precisely why all Linux distros out there install 3.x and 2.x side by side, and don't treat one as an update to another.

    If your Linux distro silently re-symlinked /usr/bin/python to python3 when you installed the latter, then your Linux distro is broken - you should complain to its maintainers. If you installed it manually, then you have only yourself to blame.

    And, getting back on topic, this all has nothing to do with 2.6 -> 2.7 transition, where the language is the same and backwards-compatible.

  13. Re:People don't upgrade by Darinbob · · Score: 3, Interesting

    The whole question of why users don't upgrade seems to be to be about making the developer's lives easier as opposed to the customers lives. But for my entire career I've had to support older releases I'd rather forget about, and it was taken as a normal and expected part of being a professional. It has only been relatively recent that developers start feeling peeved and annoyed at customers.

    However if you make it easier for customers to upgrade, maintaining perfect backwards compatibility, the problem can go away. For security issues, then back-port the fixes to older releases. You're selling a product, probably selling product support, so start offering the customers some service.

    Now I can understand with Python being an open source project that the devs who aren't getting paid just want to program for fun. That's the trap of adopting someone's pet project for production uses. But there are professional organizations who will offer paid support for open source projects.

  14. Re:People don't upgrade by RabidReindeer · · Score: 4, Interesting

    There are lots of people that have installed python (or had it installed), but not as many that are willing to upgrade their python installation to the latest version. The jump to python 3.0 is a little tricky because some code is not compatible (which is why we still have 2.x) so there's lots of software that would break if people upgrade.

    This.

    My job, like most jobs, isn't to code in Python. It's to process data, and Python (be it 2.4, 2.7, or 3.0) just happens to be one of many tools that I use to process said data.

    The fact that some developer might have built what he believes to be a better version of a Python interpreter than the one that ran my code is immaterial. I've got better things to do with my time than rewrite, re-test, and recertify known-good code.

    If changing the first line of my script to #!/usr/local/bin/pythoninterpreterforbusinesscriticalstuff isn't elegant enough for your tastes, that's the Python devs' problem, not mine.

    (If you think I'm annoying to Python devs, wait'll you see the grudge I have for Javashit frameworks and webdevs, who seem fixated on the concept that using HTML5 and Javashit is somehow more important than cross-browser compatibility, and that "cross-browser compatibility" means "all browsers will render it this week, and this week only, because the standard itself is a moving target! Who would want to display static HTML on a browser more than a week old?")

    You should be working in Java. Or COBOL.

    Most languages mutate enough that yes, keeping ahead of the bit rot is indeed as much the developer's job as coding it in the first place. The only exceptions are systems designed with the mainframe mindset that you code it and forget it for 3-4 decades. COBOL, because no one could really stand to muck with it, and Java because Sun put in deprecation mechanisms so that even really nasty old stuff will still be maintainable in an emergency.

  15. Re:The flip side... by sconeu · · Score: 4, Funny

    but I've never encountered a situation where an older version is more attractive in any way

    Windows 8 says hello.

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  16. When upgrades break code by fyngyrz · · Score: 5, Interesting

    The problem with upgrades is the developers don't take nearly enough care to ensure compatibility with existing software. For instance, I moved a Python script from an older machine (redhat 9) to an Ubuntu 12 system with a later 2.x series Python, and the script immediately bombed out. Turned out that I'd used "as" as a variable name, and it had become a reserved word in the interim. Elsewhere, I was adding ints to floats or vice-versa; now that produces an error. Somewhere, the behavior of "global" changed. I had a procedure written with global VariableName up front so the procedure could see a global switch. I handed the script to someone else, and they had to *remove* that to make it work.

    I moved a large system depending on perl scripts (yes, I know, not Python, but the issues are identical) across the same machine pair and it was so broken under the new perl that it took me two months (and cost my client a great deal of money) to adequately debug and update it. From external module changes (use DBI) to how references to hashes were handled, it was one thing after another. What made me fume the entire time is that this stuff worked *perfectly* under redhat 9 with the earlier perl -- it really wasn't broken. Bloody perl was broken! Worse, I'd abandoned Perl for Python years ago, and my Perl skills were very rusty... that's tough when you're trying to work through tens of thousands of lines of sophisticated code. I truly regret every line of Perl I ever wrote, and cringe at the idea of having to revisit it for any reason at all, because Perl, whatever its true merits, is a language that I was destined to hate to my very $core;

    This kind of thing makes me extremely unwilling to upgrade; for that matter, it can send me hunting for the old version to install in new machines, although that can present its own set of problems and requires at least some of a different skill set than programming that really leans more into system administration, which I am not in the least enthused about. For some strange reason, enjoying research on auroras does not automatically carry with it a predilection for meddling with OS environments.

    This is all part of a larger gripe set I have where makers of languages and APIs break existing code in favor of new ideas. Here's my position: If you ship the language with X features, you have NO BUSINESS breaking ANY of those features. You have a new idea? Fine. Implement it as something completely new within the language or the API. If it's got new keywords, provide the programmer a switch to enable them -- words that were not reserved before may have crept into the user's namespace(s.) Never take a call out of an API. Never make an API call work differently. If you think you need to do that, then *I* think you need an entirely new API. If you even use the word "deprecated", I will burn you in effigy and spit on the ashes. Furthermore, if you do it right, you will NEVER need to say "end of life" because the most current version will still run the first code ever written for API or language 1.0; upgrades will actually be upgrades rather than incompatible replacements.

    Windows got this very nearly right for a long time, then with XP, they began to break everything from window metrics to system calls. By the time Windows 7 rolled around, apps that worked perfectly looked like trash and worked even worse, and I tossed my Windows machine in the can both for development and as a user. Apple's guilty of this too, even going so far as to obsolete their own applications and feature-sets. One really irritating example of this is having bought Aperture 1, 2, and 3 for OSX 10.6, I bought a new camera, a Canon EOS 6D. Works *fabulous*, pretty much the first DSLR I've ever been actually satisfied with. Both Lightroom and Aperture required an update to read the RAW images. Lightroom upgrade went smoothly. The Aperture upgrade? Told me that in order to install the updated RAW support, I'd have to upgrade the OS. But 10.7 and later are not highly compatible upgrades, I have to support OSX

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:When upgrades break code by fyngyrz · · Score: 5, Insightful

      The changes from Python 2.5 to 2.7 are likely to be much less pa

      Why should I accept any pain at all? How about if I just don't upgrade, and my stuff doesn't break, and I continue on making new things? Isn't that more sensible on every possible level?

      --
      I've fallen off your lawn, and I can't get up.
    2. Re:When upgrades break code by smash · · Score: 5, Insightful

      Exactly that. Nobody cares if your new version is 10% faster, or has new feature X. If someone is using your language for something serious in the real world, and your upgrade BREAKS CODE, then all bets are off.

      Even if the time and effort (in the real world, money, essentially) is spent to "fix" the project to work with the new version, all prior testing is essentially worthless, and the developer can't "trust" the code is correct and bug free any more until they've had sufficient time and testing to be comfortable with it.

      This problem is endemic in open source unfortunately, and not just for developers - constant UI change, application deprecation/replacement, etc. Every time you change something significantly, there's a real cost to any person using it, even if your software is free. Even if they decide not to use it any more - they need to find a replacement and re-learn how to use the replacement.

      I'm not saying "never change anything". But more work needs to be put into shims, switches, etc. to enable backwards compatible behaviour if possible - even if it is not enabled by default.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    3. Re:When upgrades break code by icebike · · Score: 4, Insightful

      Exactly.

      Refuse to accept new release that don't support backward compatibility of existing code.
      Every other sane programming language does this to the fullest extent possible.
      Seems Python likes to just cut the cord.

      --
      Sig Battery depleted. Reverting to safe mode.
    4. Re:When upgrades break code by MarcoAtWork · · Score: 4, Insightful

      That was probably going from Perl 4 to Perl 5. Going across a major release where many features have changed is going to cause problems with any language. The changes from Python 2.5 to 2.7 are likely to be much less pain.

      not necessarily, in my experience one of the bigger issues is incompatible changes made in CPAN code: plenty of things change and it's not like you can say 'install from CPAN of 3 years ago'. If you write straight perl (i.e. no external modules) it's unusual for things to break badly, but if like most people you use CPAN modules you're at the mercy of each individual CPAN package mantainer

      --
      -- the cake is a lie
    5. Re:When upgrades break code by UnknownSoldier · · Score: 3, Insightful

      Very nice post! If I may summarize:

      To paraphrase Robert Monroe: "Change is the only constant. Fast change is called revolution, slow change evolution."

      The inexperienced young want change because of some cool new feature X, Y, and Z.
      The experienced older want stability because they know the wisdom of "Don't fix what isn't broken!"

      Businesses typically want stability because why would they pay someone again to re-write, refind bugs, re-test, and re-fix bugs, when the old version worked before?

      The only reason to *really* change an API is because of security issues, aka how Microsoft "extended" legagy C API's to 'safe' versions such as: scanf vs scanf_s, etc.

  17. Re:People don't upgrade by fyngyrz · · Score: 4, Insightful

    Upgrading to 2.7 doesn't introduce the kind of incompatibility that upgrading to 3.0 does.

    No, but it still introduces significant incompatibility -- things can and will break -- and so re-testing, re-coding, re-certifying... still required. Now, you have two choices:

    a) Don't screw with the system, and everything continues to work just fine, no extra costs or problems are encountered, and everyone is happy except the cluetard who write TFA, who no one cares about anyway. Or:

    b) You can upgrade, break everything, incur lots of costs, and everyone in every direction is pissed off except said cluetard.

    Now, I ask you: what's obviously the best choice here?

    --
    I've fallen off your lawn, and I can't get up.
  18. Re:People don't upgrade by smash · · Score: 4, Insightful

    The only exceptions are systems designed with the mainframe mindset that you code it and forget it for 3-4 decades

    You just described any serious application used in production in a real business, who's core industry is not "software development". Fucking around re-writing stuff costs money. Re-testing everything costs money. Fixing bugs costs money. Unless there's a REALLY good, real world fucking reason to be spending said money that will directly impact the business in question it is wasted money.

    This is exactly the sort of thing many open source people don't seem to get: even if your software/development tools are FREE, pulling major compatibility-breaking changes costs real world people real world money. THIS is why Windows is so popular in the real world.

    We know the security is inferior. We know the stability is often questionable. We know it costs money in purchase and/or ongoing licensing fees. BUT: you pretty much get a guarantee that any code written today will continue to run for at least 10 years (due to specific OS version support for that long) and likely a lot longer than that; due to API support normally extending even further. Re-writing shit just because the platform changed costs real world time and money.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  19. Re:OS versions by icebike · · Score: 4, Insightful

    Just look at the time line:

    (2.4 in 2008, 2.5 in 2011, and 2.6 last October),

    Stop obsoleting code on a 3 year cycle and you wouldn't have so many stragglers.
    Programming languages need stability and backward compatibility. You can't rebuild the world each time
    someone decides to issue a point release. Handle it in the compiler.

    --
    Sig Battery depleted. Reverting to safe mode.
  20. Re:OS versions by plopez · · Score: 3, Interesting

    Which is why COBOL will probably out live Python. Stability.

    --
    putting the 'B' in LGBTQ+
  21. Re:OS versions by S.O.B. · · Score: 3, Insightful

    Exactly. I'm pretty sure COBOL programs I wrote almost 30 years ago would still compile today. That code would be about the same age as the guy mentioned in the summary (5 years out of university btw) who is whining about supporting 3-5 year old code. Boo-hoo.

    I'm pretty sure when the world ends the only thing left will be cockroaches and they will be using COBOL.

    --
    Some of what I say is fact, some is conjecture, the rest I'm just blowing out my ass...you guess.
  22. Re:OS versions by EmperorOfCanada · · Score: 4, Insightful

    I love most things about python but there is something supremely arrogant about waving your hand and saying, sorry but we broke all your code. I hear all kinds of very well thought out arguments involving unicode and whatnot; but there are dozens of other languages that didn't break backward compatibility and have added all kinds of fundamentals such as ascii to unicode.

    I get this feeling that the core developers of Python have lost focus of what the typical developer wants. I see the same thing happening in C++ with templates. Templates aren't bad its just that the bulk of C++ developers are far more interested in the cool new iterating system in C++ than all the wonky template features that are added hourly. Luckily with C++ there has been no threats to break backward compatibility.

    It is almost like these people are trying to impress some old CS professor instead of making their customers more productive.

    But where the python people are playing with fire is that if a company has a massive codebase that is getting creaky and needs a huge Python porting effort that would probably be combined with a huge architecture refactor then that company might think, "we don't want to be forced to do this in the future, so what other language has been more version stable?" Or you might have a new IT head who has been pushing for his favorite language and will take advantage of this to switch. Python is awesome but there are other fish in the sea; and as we all know even good languages can fade (see PERL) and no so good languages take their place (PHP).