14 ms·
Python 2 Is Dead
- CameronNemo 7y agoSoftware is never alive or dead. And python2 can certainly be found in the wild. Just yesterday I tried to use buildroot to build an image for my rock64 board. The build failed because a python2 script was executed by a python 3 interpreter.
- deleted 7y ago[deleted]
- erik_seaberg 7y agoEvery shebang should say python2 or python3. Whatever you want, "python" is not a reliable way to get it.
- downerending 7y agoTrue. And certainly a python3 script should never, ever assume that 'python' is python3.
- CameronNemo 7y agoIn hindsight, sure. But this is a three year old script.
- meddlepal 7y agoAre there any companies out there that might sell supported updates to Python 2 going forward? Seems like a decent business idea considering how much Python 2 is still in the wild.
- throwaway894345 7y agoSeems like that would quickly fragment unless the ecosystem consolidates around one particular vendor or all such vendors consolidate on a standard fork.
- hexane360 7y agoI will not buy this python, eet is scratched. Do you want to come back to Python 3, bouncy bouncy?
- smitty1e 7y agoSorry, my hovercraft is full of eels.
- hprotagonist 7y agoyou have beautiful pys
- battery_cowboy 7y agoLong live python 2! Edit: this comment is meant to be funny but serious, it's not going anywhere, I've seen older tech that's still going strong in the "enterprise".
- baud147258 7y agoOne piece of software (a kind of custom package/build manager) I'm using at work still runs on Python 2. If it still works, why change it?
- blauditore 7y agoBecause of potential vulnerabilities due to the lack of patches (in the future)?
- tsbinz 7y agoThere will be patches. Ubuntu 18.04 LTS shipped with 2.7 and is supported until 2023. RHEL 7 shipped with 2.7 and is supported until 2024. What will be interesting to see is if there will be a "standard" fork that everybody pulls patches from, or if every vendor patches himself ...
- baud147258 7y agoThough it's deployed on Windows...
- riazrizvi 7y agoPerhaps vulnerabilities are not a concern here.
- beefee 7y agoBecause python2 isn't just a language that dissolves away once the program has been written. It's also a thick interpreter and runtime system that will slowly rot away without maintenance. It's yet to be seen how this runtime will be maintained in the future. Of course, given the enormous usage of python2 it's clear that it will be possible to use it far into the future. But it's really an unprecedented situation where an enormous software platform is abandoned by its developers. If this were a commercial product, it would filter through the long tail of software graveyards like Oracle and Computer Associates. I imagine the main annoyances in the future python2 landscape will be vendor fragmentation and diverging implementations.
- Bahamut 7y agoThat page may say that, but I still maintain a ton of Python 2 work stuff that will never be off of Python 2 while the work ecosystem lives.
- brnt 7y agoAlways felt like Python 2 is going the way of Latin, it won't develop anymore, but it will still be used, in ever fewer niches.
- deleted 7y ago[deleted]
- pjmlp 7y agoActually Latin is still being developed, as official language for Vatican documents and they have language experts to update the dictionary for modern terms to keep the language updated. Telephono mobili Android decurrit
- Rochus 7y agoknife and fork
- blauditore 7y agoI'm wondering, can't existing Python 2 software be automatically converted to Python 3? It might be ugly at times, but still better then vulnerable...
- giancarlostoro 7y agoThey have had conversion tools for it since the early days of 3. The issue is it wont get everything.
- jimhefferon 7y agohttps://docs.python.org/2/library/2to3.html https://docs.python.org/2/library/2to3.html
- Groxx 7y agoTo join in the other comments here: because it's not safe to do so automatically. There are semantic changes to the language that do not have automate-able solutions. E.g. how strings/unicode/bytes work, to name just one.
- harikb 7y agoThey exist, but Python, being a dynamic typed language, at least by default, runs a higher risk in automated conversions. Just because it compiles after conversion doesn’t mean it isn’t broken. Unless the code base has a very very good set of unit tests, which is unlikely in practice, it is very risky to do automated conversions. Whereas the same situation with Java, Go, Rust etc would be slightly better. Sure you would still have bugs but lower probability.
- daotoad 7y agoNetcraft confirms it.
- brians 7y agoWhat would kill Python 2? RCE in pip?
- saila 7y agoThe pip docs say support for Python 2.7 will be dropped in January 2021 or if there are show-stopping bugs in Python 2.7 that affect pip before then: https://github.com/pypa/pip/blob/master/docs/html/development/release-process.rst#python-2-support https://github.com/pypa/pip/blob/master/docs/html/developmen...
- banana_giraffe 7y agoDoes that mean that random things that rebuild or restart and require "pip install requests" before they start up or whatever will just gleefully break on Jan 2021?
- saila 7y agoI'm guessing you'll get a warning when installing or updating pip on Python 2.7. I know for Python 3.4, pip has been showing a deprecation warning whenever it's installed for a while now. I assume they'll do the same for 2.7. So, I suppose the answer to your question is yes--if you blindly update pip and/or you don't heed those warnings and pin your pip version accordingly. Edit: I was curious, so I installed the latest Python 2.7 and pip. `pip install` (or any other pip command) shows a deprecation warning with info about dropping support for Python 2.7 every time you run it.
- saila 7y agoI didn't get the point of this at first (and still kinda don't). I think the most useful thing might be this link: https://python-release-cycle.glitch.me/ https://python-release-cycle.glitch.me/. It's a nice visual representation of Python version lifetimes, which is useful when deciding which versions you want to support. I wish they'd put something like that on python.org.
- mixmastamyk 7y agoAwesome idea but desperately needs some width and vertical lines to actually be useful.
- zucker42 7y agoIt's just a gag based off Monty Python. I don't think it's meant to be anything more.
- joefourier 7y agoWhat motivated the Python devs to abandon backwards compatibility with Python 3? I don't see any major departures or revolutionary new features transitioning from 2 to 3. While there's certainly upgrades (e.g. strings), there's enough small changes that upgrading to 3 is rarely a pleasant experience.
- macintux 7y agohttps://snarky.ca/why-python-3-exists/ https://snarky.ca/why-python-3-exists/
- harikb 7y agoWhat that article casually ignores is the fact that there could have been a Python 2 fix (as Python 3) that took the approach of fixing encoding to utf8 only. If that was the only thing Python 3 vs 2 was breaking, life could have been so much better.
- mixmastamyk 7y agoThe go approach was not well known at the time, maybe would have worked. Water under the bridge.
- downerending 7y agoSummarizing, that article says "we fixed Unicode". Well, guess what? Unicode in Python3 is a catastrophe. The truth is that Python3, as a new language incompatible with Python2, was a mistake. I'm sure it was well intended, but here we are.
- joshuamorton 7y agoWhat's wrong with it?
- downerending 7y agoConsider this, for example: https://click.palletsprojects.com/en/7.x/python3/ https://click.palletsprojects.com/en/7.x/python3/ and here, have a nice sandwich of this: https://stackoverflow.com/questions/57652720/runtimeerror-click-will-abort-further-execution-because-python-3-was-configured https://stackoverflow.com/questions/57652720/runtimeerror-cl... or this bullshit: https://bugzilla.redhat.com/show_bug.cgi?id=1404918 https://bugzilla.redhat.com/show_bug.cgi?id=1404918 The truth no one wants to hear is that Python2 did Unicode right (or as well as could be expected), while Python3 is a train wreck, even if you just stick to LANG=C and ASCII.
- hujun 7y agoThe first IPv6 RFC(1883) was published back in 1995, 25 years later, IPv6 only network is still rare.
- throwaway3878 7y agoPython 2 isn't dead. What they really mean is: "See all those countless developer-hours spent into adding features, fixing bugs, patching vulnerabilities for free in a language you use every day to make boatloads of money without us ever asking anything in return? Well we won't do it anymore. For free, at least."
- xwdv 7y agoIf enough people say it’s dead and believe it in their heart, it makes it true. Personally it’s long been dead to me.
- serf 7y ago> If enough people say it’s dead and believe it in their heart, it makes it true. except for COBOL, which has the Schrodingers' property of having been (called) dead for 40+ years, but also somehow powering the world and its' infrastructure.
- drdeadringer 7y agoWho besides "government" and related spin-offs such as DoD contractors use COBOL? Does "subsidized zombification" count for a programming language being otherwise dead? Side Note: 20 years ago a SciFi book introduced me to the idea of "Software Archaeology". These days, such a term is slowly gaining traction as a job description. I've had to professionally dabble into this myself from time to time.
- AtlasBarfed 7y agoKInd of what Oracle is doing with Java. Churn the language super-quickly. Oh you want security patches and support on the 18 month old language? Pay us money.
- deleted 7y ago[deleted]
- dorfsmay 7y agoSo is OSX going to have python by default now?
- riazrizvi 7y agoDo you mean is MacOS going to have Python3x installed by default now?
- ridiculous_fish 7y agoApple has said that Python will be removed from the default macOS install.
- bobbylarrybobby 7y agoLooks like only python2 is being removed: $ /usr/bin/python2 WARNING: Python 2.7 is not recommended. This version is included in macOS for compatibility with legacy software. Future versions of macOS will not include Python 2.7. Instead, it is recommended that you transition to using 'python3' from within Terminal.
- ridiculous_fish 7y agoThe Catalina release notes do say "Future versions of macOS won’t include scripting language runtimes by default."
- dorfsmay 7y agoThanks. Sad, especially considering they moved to zsh. Trying to write short scripts that work both on Linux and Mac is getting more difficult.
- ridiculous_fish 7y agoI agree, yet I think it's for the best. Apple has not been a motivated steward of the Mac Unix layer, so it's best for them to get out of the business entirely, and make space for the community to converge on a standard package manager.
- russellbeattie 7y ago16 years after the start of Python 3 and we're still discussing this. I hope other languages and platforms have paid attention to this transition. Sometimes one's only purpose in life is to serve as a warning to others...
- reedwolf 7y agoNot sure what you mean. This was the best way to do it. Slowly and painlessly. Any project that matters is now on 3. For a bad transition, look at Perl 6, a debacle so big it was renamed Raku and became a different programming language.
- TylerE 7y agoIt was, by any standard, just about the worst way to do it. Fractured community Lost trust Endless bikeshedding All for very little objective gain.
- mixmastamyk 7y agoNope, perl was mentioned just above. This was the second worst way. ;-)
- TylerE 7y agoThe distinction I would make is that they never told anyone to migrate production code to Perl 6.
- mixmastamyk 7y agoThey couldn't even if they wanted because it didn't ship for twenty years.
- TylerE 7y agoBut that’s why Python is much worse than Perl. The Python team was trying to move the world to 3 when it was demonstrably inferior
- TheDesolate0 7y agoLOL Try telling that to Mozilla
- justinsaccount 7y agopython2: just works. If you install python2 you get the same stable version everywhere. python3: Oh, sorry, you used a feature that was added in 3.x and this system has 3.(x-1) so now you get SyntaxErrors, or worse, random runtime exceptions. If you can target a container, buildpack or a specific platform python3 is fine, but it's been terrible for developers and users since day one. At least, it's been terrible for me, which is why I still have a pile of stuff to port to python3. It's fine for something like go or rust to add new features in a dot release, where you just need to upgrade your development hosts. Besides, if it compiles it will work, no surprises later. But python3 adds new features in 3.5, 3.6, 3.7 and then immediately breaks all new code on older systems. Used f-strings? Now your code is broken on 3.5. A new feature used the walrus operator? Now your code is broken on any system that doesn't have 3.8 yet. And 'dead' python2 keeps working.
- cheez 7y agoI was surprised at the number of libraries that exist to port 3.7/3.8 stuff back to 3.5
- stOneskull 7y agoProbably because of Debian 9. Now new Debian 10 means there'll be staying at 3.7 for a long time.
- chungy 7y ago> python2: just works. If you install python2 you get the same stable version everywhere. > python3: Oh, sorry, you used a feature that was added in 3.x and this system has 3.(x-1) so now you get SyntaxErrors, or worse, random runtime exceptions. Maybe you were used to Python 2.7 only as "Python 2", but when it was in active development, major 2.x releases had the exact same thing. I had some serious troubles when the latest version of RHEL was on 2.4 while the rest of the world had 2.6 with very large changes. There were all kinds gross hacks just to make things work on an older, common version.
- mehrdadn 7y ago
- seemslegit 7y agoIt's just resting.
- bionoid 7y agoI came across Tauthon [0] a while back, it seems quite active. I have a codebase that has proven difficult to port, so this is the backup plan.. "Tauthon is a backwards-compatible fork of the Python 2.7.18 interpreter with new syntax, builtins, and libraries backported from Python 3.x. [...]" [0] https://github.com/naftaliharris/tauthon https://github.com/naftaliharris/tauthon
- harikb 7y agoRegardless of Python 2 vs 3, what is sad is that every new language, be it Go, Rust, Swift, Dart, Nim whatever is dividing whatever set of ‘good, smart, and creative’ engineers we have into smaller group each implementing their own sorting algorithm in their own language. Just to be clear, I am not counting myself among them. I am talking about those who design languages, write runtimes, JITs, stdlibs whatever - people much smarter than us. They do this in their free time! I am surprised that even 1,000+ languages (at least 50+ mainstream) haven’t satisfied all the wishes and itches. May be that is humanities curse! Creative people constantly want to create a new language and redesign everything while bigger and better problems remain unsolved. Python 2 vs 3 just seems like yet another thing that breaks up the creative talent pool to waste time solving the same problem in two ways. LLVM is the first thing I have seen that removes at least some of this duplication. But I hear even Rust is looking at alternate backend! Go doesn’t even use LLVM, all for good reasons I am sure.
- black_puppydog 7y agoFunny. I was actually hoping that with python2 officially dying, after more than ten years there's finally a chance to re-join at least these two specific camps. Now that managers will have to have good reasons to keep maintaining the language on their own or make the switch, I was hoping to see a more focused community with less "import * from six" overhead.
- staticassertion 7y agoAre they really divided? Maybe if people only used one language. I would suspect that almost any Rust, Go, Swift, Dart, and Nim developer today is proficient in one, probably two other languages, at the least. I doubt that even 10% of "Rust programmers" are employed to write Rust full time. What I might agree with is that interoperability is something that should be considered more going forward. I'm unsure about some of them, but Rust focuses a lot on interoperability via FFI, Go's FFI story is bad, as far as I know, Nim's is decent, and I don't knwo about Dart or Swift. The top languages are all virtually identical. There's so little difference between, say, Java and Python, despite there being so much difference. So maybe there are 50 "serious" languages, but they all fall into a few buckets. There's less meaningful diversity than it seems, I think.
- carapace 7y agoI was planning to host and maintain a fork of Python 2.7 in perpetuity (I was gonna call it "Bladders" ;-) It turns out that Pypy will have Python 2 support. I don't know the details but it sounds like you'll be able to run py2 code using pypy (not pypy3) for N more years.
- madrox 7y agoPHP is still used by 78.2% of the internet according to some sources [1]. The death of any language or version is always greatly exaggerated. Maybe new projects aren’t being spun up with it, but many old projects never die and need ongoing maintenance. Until very recently the most recent project I was working on used python2. 1. https://w3techs.com/technologies/details/pl-php https://w3techs.com/technologies/details/pl-php
- zeitg3ist 7y agoPHP is one of the few languages that advertises itself by default in server headers, so I would take that data with a grain of salt.
- nolok 7y agoYou say "php is still used" as if php was dying, it's never been stronger. The language is getting much better every year along the new versions, and the ecosystem is getting better.
- moron4hire 7y agohttps://m.youtube.com/watch?v=vK3WhJGg7PM https://m.youtube.com/watch?v=vK3WhJGg7PM
- Aeolun 7y agoPython 2 has been zombified!
- qqssccfftt 7y agoSociety if Python 3.3 was the first version of Py3k (picture of utopian society)
- thysultan 7y agoLong live the King.
- coldtea 7y agoCobol is still alive, so I very much doubt Python 2 will be dead anytime soon...
- pjmlp 7y agoActually Cobol got its latest ISO revision in 2018, so it is more Python and less Python 2.
- mark-r 7y agoI was wondering what could be added to the discussion at this late point, and the answer is - nothing. The page is nothing but a transcription of one of Monty Python's better bits. I'm sure someone else has done it before, perhaps better.
- 1337shadow 7y agoBest transition ever IMHO: I started Python end of 2008, approx 1 year prior to Python 3 release, which I started learning at the same time I was learning Django. I disregarded Python 3 for a few years, then started accepting pull requests for Python 3 support on my packages when Django started to support Python 3, added it to the CI build matrix. Then, I started to code compatible with Python 2 & 3 while keeping Python 2 as my main Python (private codebases). A few years later (not so long after Arch Linux made Python 3 the default) I started using Python 3 as main Python, contributed to other packages for Python 3 support as I needed it. It was hard, until I became sufficiently efficient at it, then it became a joy to have "such easy" contributions to make to the Python ecosystem, note that at the same time I was doing the same with Django versions which did break user code often on upgrade. Perhaps it's because I worked so hard to upgrade codebases during Django 1.x days, and Python 2 to 3, that every upgrade now seem so easy, anyway, it basically feels like I have nothing to do anymore given the current state of the parts of the ecosystem that I depend on. As of this day, I must admit that the whole operation has been a great success. I could jump in the train when I felt like it, and nowadays upgrading has never been easier, asyncio has become really fun to use with Python 3.8, Django 1.x days were hard on users to upgrade, but since Django 2.0 it's mostly been a no-op for me, most of my Django 2.x codebases just work on Django 3.0. For those who had left Python or Django, or decided not to try it at all, it really seems to me that now is the best moment than ever to try it out, again or for the first time. Yes it was pretty hard, yes it took a while, but I really feel golden about the current situation. I'm glad I sticked with Python and I see people coming back to it, it's really useful for a wide variety of use cases.
- millstone 7y agoIt's not normal to have to write new code to retain compatibility. ES6 was a huge change, but was sufficiently compatible with ES5 that you didn't need to double your test matrix. C++11 is another example of a major evolution that retained backwards compatibility. There have been other painful upgrades (Swift, Rust) but these have been in younger languages with less established codebases; both have since shifted to a mature-language model. Python3 is unique in attempting to aggressively evolve a very mature language with deep established codebases, and has paid a heavy price.
- stefantalpalaru 7y agoWhat is dead may never die: https://github.com/naftaliharris/tauthon/ https://github.com/naftaliharris/tauthon/
- musicale 7y agoPython 2 is not dead. https://www.pypy.org https://www.pypy.org
- at_a_remove 7y agoIt's still alive where I am. Our eight hundred pound gorilla of its industry depends on another, lower eight hundred pound gorilla in a different industry, to the point of tying the version we are on (and one that is only rarely, carefully changed), to a X.Y.Z version of the gorilla below. Upper gorilla upgrades are expensive, frightful, and slow to come due to the cautiousness of the industry. That second, lower gorilla comes with its own 2.Y.Z version of Python installed and a help page in a large, bold font explicitly forbidding upgrading that Python 2.Y.Z version, lest some dire things happen. And so in my little niche of the world, Python 2 Is Alive. I am not holding on out of stubbornness. As I learned in a previous job, software lives for a lot longer than expected or even desired, like some declared extinct species popping up decades later.
- sriram_malhar 7y agoDon't make the mistake I did: do not delete python2 from Linux. My python environment on my Linux box was hopelessly messed up, so I thought I'll delete all python installations and start afresh. I did not realise how much Linux(Ubuntu) depends on python2. When I attempted to do an apt install, it started deleting all kinds of programs in /bin, /usr/bin and so on. The machine wouldn't boot up. It had to be restored from scratch. But it did achieve the original objective of having a properly functioning python :) If someone can explain this dependency of the package management system or the behavior I saw, I'd be very grateful.
- ivan_ah 7y agoHere is a link to the Monty Python sketch where this post takes its lines from: https://youtu.be/vnciwwsvNcc?t=154 https://youtu.be/vnciwwsvNcc?t=154