back to article For real this time, get your butt off Python 2: No updates, no nothing after 1 January 2020

Python 2 will sunset on January 1st 2020 – however, many applications have not yet upgraded to version 3, causing the coding lingo's team to mount a communications campaign to persuade devs to port their code. Python is the third most popular programming language after JavaScript and Java, according to Redmonk. Its use has …

          1. ST Silver badge

            Re: 20 years is a lot of time.

            > For the comparisons to C, try taking C code from 1975 and compiling it and running it today.

            GCC can compile K&R C today. K&R C being just about as far back as you can go with C, and it still being considered C.

            You can mix K&R C with C89 or C99 in the same executable or library. It just works.

            For example, there's a lot of K&R C code in bash.

            Yeah, K&R C is from 1978. That's 41 years ago. I was playing with spaceships and aliens in 1978.

            How long did it take Python 2 to become incompatible with Python 3? 7 years?

          2. Hogbert

            Re: 20 years is a lot of time.

            Absolutely right. It's almost like the release of Python 3 was a foreshadowing of the future of the internet and social media; people chose to be outraged, and swore they would stand their ground, because no programming language upgrade should ever lose backward compatibility.

            I thought at the time, sure, they will all come round to using the new version when they realize why the improvements were made. But some of them didn't, and still refuse to. I guess they just choose to remain outraged, as is the current fashion on so much of the internet today.

            I can't remember the details from back then, but I think there were a few quirky command constructs pre version 3, and there was an effort to make some of the language features more consistent with other parts of the language. I remember reading about people who found the task of transitioning existing code to the new version was not really a great ordeal. I can't be sure tho, I haven't used or followed Python discussion for some time.

          3. JohnFen

            Re: 20 years is a lot of time.

            > try taking C code from 1975 and compiling it and running it today.

            OK, I did this last night with a few programs. There was no problem, as expected.

      1. DavCrav Silver badge

        Re: 20 years is a lot of time.

        "Are people still using Windows 98 SE? No? Then why are they still using Python 2?"

        Are people still using C? Yes. First released: 1972.

        Are people still using COBOL? Unbelievably yes. First released:1959. C++ is from 1984.

        1. Teiwaz

          Re: 20 years is a lot of time.

          Are people still using COBOL? Unbelievably yes. First released:1959. C++ is from 1984.

          I never get this - for most business logic, COBOL is still perfect. I've been hearing 'academics' knock COBOL for decades - starting at Uni in the early 90's 'nobody uses COBOL anymore' all the staff at one notable English University stated categorically.

          Granted, COBOL could do with modernisation, but mostly it's an image makeover it needs.

          1. chris_stjohn

            Re: 20 years is a lot of time.

            Remind me - how many digits should we reserve for the year number?

        2. joeldillon

          Re: 20 years is a lot of time.

          There are still industrial automation systems etc running things like Windows NT 4, yes.

          1. EnviableOne Silver badge

            Re: 20 years is a lot of time.

            i have it on good authority one bank HQ is still running an ICL Mainframe, with most of the parts sourced from a friendly internet based auction site ....

      2. Pascal Monett Silver badge

        Re: see if it still works

        If you have a complete system, then maybe. You might want to replace the CMOS battery before starting it up.

        However, I regret to say that Win98 SE no longer installs on existing hardware since about a decade ago, if not more. Even XP can no longer install on "modern" hardware.

        That's why I moved to Win 7.

        1. LenG

          Re: see if it still works

          The Win98 machine may work but you may find that the bits have fallen off the floppies.

          As for Win 7, you do know that neither Intel not AMD support it on their more recent CPUs? From what I have read, installing in on a new AMD Ryzen system is a real pain due to the USB support.

          1. This post has been deleted by a moderator

      3. Anonymous Coward
        Anonymous Coward

        Re: 20 years is a lot of time.

        Twenty years is nothing if your main business is in getting things done, and computures - and languages you write in - are but a tool, merely means to an end. It is pretty common for the computer programmes to outlive both the hardware they were originally written on, and their original creators. Much of of scientific computing - the area where I have some idea what I am speaking about - is like that. From what I read and hear, much of the industrial control machinery, air traffic control, and business back-end processing - things which, unlike the eye candy of the web, matter in real life - is the same. You write these things rather infrequently, at a great expense - and afterwards you expect them to work, given good maintenance, essentially indefinitely - like any good machine. The very last thing you want in these situations is a computer language which keeps introducing incompatible changes underneath your process- and possibly life-critical code.

        Naturally, there are also quick'n'dirty prototyping and analysis gadgets. Those you'd rig up quickly, using whatever bits of code and duct tape you have lying around. In those cases, you don't really care if the language you use will drift in five years' time, making your scripts unusable. Even then, these things tend to come back and bite you when you realise some time later that you could have used these tools for something else again - except they no longer work, even though your code haven't changed a yota.

        I know what kind of language I prefer - but to each his own.

      4. dajames

        Re: 20 years is a lot of time.

        Are people still using Windows 98 SE? No? Then why are they still using Python 2?

        Because Python 2 is still being supported by its originators, which Windows 98 SE isn't.

        Because they have big systems written using frameworks written in Python 2 and either the framework hasn't been migrated to Python 3 or the upgraded version isn't quite compatible with the old one and they can't see any reason to migrate.

        Dropping support for Python 2 should have been done years ago! Not in 2015, maybe, but extending to, say, 2017 would have made more sense than 2020.

      5. katrinab Silver badge

        Re: 20 years is a lot of time.

        People aren't using MS DOS v3 any more, but they are still using Objective C, both released in 1984. A new version of an operating system does not mean a new language.

        1. DCFusor

          Re: 20 years is a lot of time.

          I still run a version of Protel PCB layout tools in DosBox for the odd board I need to design. Does that count? The old version was free, ran on 286's. It screams on a modern machine in dosbox as you might guess. It just makes PCB artwork that's still accpeted by every major fab house and usable for contact printing in house.

          The new version of protel tools costs several tens of thousands of dollars and has added so many features you need to hire a dedicated guy to study and use it all day to stay up with it, buy component libraries with pinouts and definitions for schematic capture instead of just saying "give me a qfp 32 here". and for small scale use is the very definition of impractical.

          Perhaps things like this are why some people keep using the old stuff? IT works, it's simple, the learning curve is less, and they get on with doing their business instead of giving all hope of profit to some over complex tool creator.

      6. bombastic bob Silver badge

        Re: 20 years is a lot of time.

        "Then why are they still using Python 2?"

        because they WANT to! Nun-Ya-Business!

        In some businesss you may find Win '9x still in use, particularly for controlling machinery that's >20 years old and there are *NO* device drivers written for that old machinery for Win-10-nic, if for no other reason that Micro-shaft's "driver signing" policies

        And why is it YOUR business whether or not people CHOOSE TO USE SOMETHING THAT WORKS WITH OLD CODE THAT STILL DOES THE JOB ???

        "UP"grading is _SO_ overrated... if not for the feature creep and API breakage, I'd do it more often.

        (quite obviously I don't - I like stable systems that don't waste my time constantly maintaining them, and instead are fixed targets that don't keep moving like Lucy and Charlie Brown with the football.)

        icon because, facepalm you'd actually say that

      7. EnviableOne Silver badge

        Re: 20 years is a lot of time.

        I still think 98SE sp5 was the peak of Windows.

        Its still more satble than this mess of win 10.

  1. fobobob

    But but

    print "but my parentheses-free print statements!"

    1. Jason Bloomberg

      Re: But but

      If they had found some way to fudge round that issue I believe most reticence in migrating to Python 3 would have disappeared. But it seems the desire for 'Python Purity' outweighed pragmatism.

      What worries me more than other cases, where a language or framework becomes "not supported" but everything works the same the day after as it did the day before, is the current plan appears to be tending towards pulling the rug out from under 2.7 user's feet. It's really not clear to me what will happen when 2.7 reaches 'end of life'.

      1. david 12

        Re: But but

        It was c purity they were trying to maintain, as also shown by the <> != change, and the insistence at the time that the c library was the only possible way to do math (thankfully abandoned soon after, but following years of amazing blindness)

        The people who maintained python-written-in-c were really c programmers at heart, and at the time of the fork between 2.x and 3.0, their idea of what a language should look like was still defined by c.

      2. This post has been deleted by a moderator

  2. amanfromMars 1 Silver badge

    For All Those Right Comfortable in the Driving Seat with AIMagical Monitoring Mentors.*

    Changeset, a consulting company that offers "short term project management services for free and open source software projects", to "help communicate about the sunsetting of Python 2".

    Nice one, Changeset. Bravo. Very Agile in Deed indeed.

    That puts you in a remote position expectant of delivering leading novel information for activation/presentation/revelation thus to demonstrate viable physical lead in and from surreal virtual stimulations and simulations.

    *Injun Territory, Kemo Sabe. :-) ..... although with King Solomon's Mines Booty and Bounty, what's not to like? :-)

    The Future AI and IT now simply require that you make a Quantum Communications Leap with Orders to Prevail Fully Availed of AIMaster Resources.

    Any other choice leads eventually, inevitably, to the dank and deadly depths of darkness .... so the QCLeap is a No-Brainer.

    1. Tail Up

      Re: For All Those Right Comfortable in the Driving Seat with AIMagical Monitoring Mentors.*

      Do the ten downvoters seem to be ready to loose?

  3. Anonymous Coward
    Anonymous Coward

    Python -- Major version changes....

    Python 1.5 was where I started...great language to get going with. The move to Python2 was essentially painless....also great. Then I had to move everything from Python2 to Python3.....even for my modest portfolio of code this was an absolute nightmare. Three related components of this nightmare stand out. First there was Unicode. Second was the bytes vs strings innovation. Then there was the "helpful" utility 2to3 which often didn't help. The second one was marginally more painful than the first because my Python2 code had lots of places where the code was reading and/or writing to low-level database files (FoxPro and the like).

    Anyway, it does not surprise me in the least if organisations with mountains of Python2 code are REALLY LEERY of converting their code. Good luck out there!!!

    1. Psmo

      Re: Python -- Major version changes....

      bytes vs strings innovation

      my Python2 code had lots of places where the code was reading and/or writing to low-level database files

      Ouch. However, in my experience the Python 3 way of doing IO leads to far fewer encoding gotchas.

      YMMV of course, but paste the following into a Windows-based Python 2.7 interpreter, then a 3.7 interpreter to see what I mean:

      import ctypes; ctypes.windll.user32.MessageBoxW(0,"ça ne marche pas","la même",0)

      1. AdamWill

        Re: Python -- Major version changes....

        Yeah. Converting things can be a pain, but it's kinda forgivable really because the Python 3 ways are all clearly *better*. The things they change were...bad. 3's way of dealing with strings is just clearly an improvement on 2's and avoids all kinds of pitfalls that 2's approach had. I don't really see that you could've fixed the messiness of strings and unicode in Python 2 while remaining backwards compatible, and not fixing them wouldn't be a great choice either.

        1. Charlie Clark Silver badge

          Re: Python -- Major version changes....

          I agree that most things in Python 3 are more consistent and it's now generally faster than Python 2. But I still want my print statement back! :-)

        2. Paul Crawford Silver badge

          Re: Python -- Major version changes....

          For me it is the change in divide behaviour that is unforgivable. Python 2 follows the same convention as C, Fortran, etc, that int/int = int where as for Python 3 they decided you wanted that promoted to a float.

          Still, maybe I was the fool for assuming anything stable in a weakly typed language...

          1. unimaginative

            Re: Python -- Major version changes....

            Python is a strongly typed language.

            It is also a dynamically typed language.

            1. amanfromMars 1 Silver badge

              Re: Python -- Major version changes.... for AAA Virtual Instruction

              Python is a strongly typed language.

              It is also a dynamically typed language. ..... unimaginative

              :-) unimaginative by name, maybe, .... but never by nature of speech direction/subliminal edutainment.

              Welcome to the AIMad Housing Projects, unimaginative, where Advanced Anonymous Autonomy is a Default Divine Construction/Fave Rave Modus Operandi/Vivendi.

    2. Charlie Clark Silver badge

      Re: Python -- Major version changes....

      Then I had to move everything from Python2 to Python3.....even for my modest portfolio of code this was an absolute nightmare.

      Can't agree with that. If your code runs in 2.7 then changes to syntax should be minimal, and avoid 2to3. You'll obviously have some work to do with extensions, but again nothing insurmountable. But, of course, all such changes are work.

      Python 2 was actually just a rebranded version of Python 1.6, which is why moving to it was painless.

  4. Julian Bradfield

    So Python will finally be a stable and reliable piece of software!

    1. Hogbert

      No, you are thinking of Python 4, which will use braces to define code blocks instead of indentation.


  5. Crazy Operations Guy

    What happened in version 3?

    It seems really weird to me that an interpreter for a programming language can't handle code written for older versions of the code. Like I have some old K&R C that still compiles just fine with a C18 compiler. I have ancient Java that works with a recent JRE, I have 10+ year old JS that works in modern browsers. Sure, I get warnings about deprecated functions and constructs, but the compiler / engine is intelligent to work around that by simply branching to the old compiler's code So what happened to Python 3 that is making migrating from the 2.x series so difficult?

    I have very, very little experience with Python, but a wealth of experience with plenty of other languages ranging from ADA to Java, and even PowerHell. And they all have some method of running the old code, and when introducing incompatible updates to previous code, they'll almost always just implemented new functions instead.

    1. Charlie Clark Silver badge

      Re: What happened in version 3?

      In practice, the syntax changes between Python 2.7 and Python >= 3.3 are minimal. The main change that caused problems, apart from print "hello world" becoming print("hello world"), was the stricter separation of unicode and encoded strings, which unicode becoming the default. Turns out that Python is used for lots of network and file system work so that this caused a lot more problems than anticipated. Once the unicode literal was reintroduced in Python 3, it became easy to write code that runs well in both and is straightforward to maintain.

      The change was necessary because Python initially didn't have unicode support and added later. This wouldn't matter that much in an ASCII world, but Python has long been very international. There were other changes under the hood but this was the main sticking point for most. To this must be added that Python 3 required more memory and was slower than Python 2, which had benefitted from a performance release with 2.5. So 10 years ago developers were being asked to do some work to migrare their codebase to a slower platform. Yeah, not the best of arguments.

      However, having maintained the codebase of a popular library since 2013, I can confirm that writing code that runs in both Python 2 and Python 3 isn't that hard.

      1. This post has been deleted by a moderator

  6. Rich 2 Silver badge


    What a dire state the software industry is in when the top three most popular languages are JavaScript (wtf????) java and python.

    1. Martlark

      Re: OMFG

      It's because these are useful powerful languages at the heart of an immense packaging ecosystem. The organisation of libraries has become more important than individual language features

      1. DCFusor

        Re: OMFG

        Sadly this is true. The learning curve of any new language can't be that bad anymore - it has to be able to do the Turing stuff, usually does some math, some typing, some scoping - it's just a question of how to pronounce that in this one.

        The library/module ecosystem now, that's amazingly complex, different, variably maintained; which of the 10 things in this repository that claim to parse some markup is the best for my task, and imposes what other design constraints - callbacks vs blocking, how does it handle poorly formed input?.

        That's where the real pain resides. Evidently someone wrote wrappers around some C/C++ junk for ML (no one writes math intensive stuff in an interpreted language if they're older than 10) - and they are popular. If they'd been written in some older language, or some other "Fad of the year" one, the same would be true in ML - that would be the hot thing. It has little to do with python itself.

    2. Anonymous Coward
      Anonymous Coward

      Re: OMFG

      Hoping one day Web Assembly kills off Javascript.

    3. Anonymous Coward
      Anonymous Coward

      Re: OMFG

      You probably haven't written anything in ECMAScript, yet, I gather?

      Syntax, language features and implementation performance have improved considerably since the early status bar marquee on Geocities. I strongly prefer HTML+JS for user interfaces over having to deal with Tcl/Tk or the behemoth that is QT.

      1. Rich 2 Silver badge

        Re: OMFG

        And what do you use when you don't need a user interface?

    4. Crazy Operations Guy

      Re: OMFG

      Just because a programming language is popular, doesn't mean there is much written in it. A lot of studies of 'most popular' are done by just looking at common code repositories (Usually github or Sourceforge) and checking the extensions of the files (Some are even lazier than that and just look at project tags). Such studies rarely consider such factors as lines-of-code, activity, etc.

      You may end up with situations where a repository has two JavaScript projects that might have a dozen lines each and only have been touched twice in the last decade, and only a handful of people in the world actually use it. But the you have a single project written in C that encompasses tens of millions of lines of code and is seeing contributions several times an hour, and its used by literally billions of systems around the clock. In that case, these studies would still show that JavaScript is the most popular language.

      For every Linux Kernel, you have hundreds of trivial projects written in simple languages, many by CompSci students as a term project.

      The problem remain as long as we human stay obsessed with tacking numbers onto things that can't be easily quantified. Like, do you count the popularity of a programming language by number total software projects that use it? Lines of code? Number of contributions? Download count? Installation count? Execution count? Number of cycles the code has used globally? Or do you go with something based on humans and ask everyone what their favorite language is? Which one they use most often? Or even some subjective factor like what language is most important to humanity?

  7. Fazal Majid

    The problem is not libraries dropping Python 2 support

    But dormant libraries that are still in use that will never be upgraded to Python 3.

    At some point, companies will have to bite the bullet. In my case, my migration plan is to switch to Go.

  8. karlkarl Silver badge

    The majority of Python developers are either hipsters, juniors or rushers. These are not the sort of people who care about maintenance.

    That said, the idea of ever using a language that becomes obsolete like this is stupid. The statement "Ada has outlived Python, Python 2 and one day Python 3" is not only quite funny but also now quite correct.

    1. Teiwaz


      "Ada has outlived Python, Python 2 and one day Python 3" is not only quite funny but also now quite correct.

      I've not heard anyone mention Ada since the early nineties, along with Modula-2 and Pascal.

      1. Kevin Fairhurst

        Re: Ada?

        We used Ada on my CompSci course at York, '94 to '97. And then when I learned PL/SQL in 2001 I realised that it was pretty much ripped off from Ada :)

      2. Anonymous Coward
        Anonymous Coward

        Re: Ada?

        I only heard of Ada when Ada code famously floored the first Ariane 5 rocket. Provably correct code is not always used in the right location.

        Be glad you don't have to program in MUMPS because that makes Perl look well-structured in comparison.

  9. John Geek

    heck, I remember seeing how painful it was updating large complex code bodies from 2.3 to 2.5, never mind 2.x->3 I'm really really thankful I never jumped on the python bandwagon

  10. Herby

    Why didn't they...

    Make a simple transition tool. Takes in "python 2(.7)" and emits "python 3". The parser for python2.x already exists, just change what it outputs. Sure it might not be "optimal", but it ought to work. If it doesn't (something that doesn't translate) emit a nice message and a couple of suggestions, and let it go.

    Sounds like the way to go for me.

    Of course, I prefer nice ANSI C89, which doesn't have such fluff as '//' comments and the like (and MISRA seems to agree!). Of course YMMV!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021