5 ms·
Going forward, I'll be maintaining Python 2.7 for the indefinite future. This will be under project name "Bladders". (Python is named after Monty Python's Fly
by carapace 7y ago
Going forward, I'll be maintaining Python 2.7 for the indefinite future. This will be under project name "Bladders". (Python is named after Monty Python's Flying Circus. There is another fantastic British comedy called Black Adder, and the main character is sometimes called "Bladders" as a contraction of Black Adder.) Unlike Tauthon, I won't change the language at all, only maintenance. I'm also going to make a curated software repository of Python 2 code, starting with the standard lib and some common third-party packages (like Snakefood.) And I'm going to pay technical writers to clean up the documentation.
I don't give a fig about controversy. I just want to keep using Python 2.
- ARandomerDude 7y agoOut of curiosity, what is it that you like about Python 2? Not attacking you, just curious. I've never used Python professionally (mostly Ruby and Clojure), so I don't have a horse in this race.
- carapace 7y agoCheers! Answering you for all three (at the moment) comments asking: Okay, here goes. In brief, Python 3 adds work without adding significant (to me) value. As others have pointed out, you don't get anything from converting an existing project from 2 to 3 other than compatibility with 3. If the Python 3 proponents were to succeed in killing 2 then that becomes compelling, however, since I intend to maintain 2, I don't care about compatibility with 3. As I have become older my tastes have changed, and nursing an old friend seems easier and more fun than trying to stay up to speed with the new hottness. Especially since it just isn't that hot. Some details: First, I see 2 and 3 as different languages. The degree of similarity is not relevant (to my evaluation of which to use) since they are incompatible (in other words, incompatibility is binary not scalar.) Since the abdication of the BDFL it seems to me to be even more appropriate to treat them as separate. I don't know how or why but Guido was good at language design. I feel like he lost his touch somehow, and then he left anyway, so the magical "thing" that made Python so sweet in the first place is gone. (I won't comment on any particular PEPs. It's all been said by others elsewhere.) I feel that Python 2 hits a sweet spot in language design as compared, not just to other Python versions, but to other languages as well. (If you can't use Lisp or Smalltalk or Prolog at least you have Python.) Python 2.7 is a local optimum with a clear view and steep sides, eh? Python 3 goes crashing down the hill and into the woods... From this POV the cessation of modification to Python 2 is a boon. It's stable and can only get asymptotically more so over time. It also means that projects like Snakefood that do meta-programming can stabilize because the underlying language is stable. We are only now getting type checking and such, and e.g. MyPy has to expend resources to deal with changes to Python 3 or risk bit-rot. Python 3 continues to include dubious design decisions that then must be dealt with by other projects/tools. I.e. syntax highlighters have to be modified to deal with "fstrings", etc. It drives a continuous process of change for the sake of change without introducing anything fundamentally new and useful. As a developer, your knowledge is depreciating as you sit there because the language is in flux. With Python 2 the thing you're studying and using is stable. In fact, it's possible that the total amount of code could contract in a stable regime. Especially if you have dev time to work on it (that isn't wasted on pointless new features that then engender additional work to learn and use.) You can also spare cycles to work on things like improving the standard library documentation, or the packaging/versioning mess, or really anything other than tweaking the language (and, again, making more work for everyone without adding fundamental new facilities.)
- kstrauser 7y agoOne very high cost to staying on 2 will be that the pool of 3rd party modules you can draw from will continue to shrink as projects drop support for it. Sure, you can stay on Requests v.whatever, but eventually the SSL certs that it includes will expire, and then you'll have to maintain your own patched Requests with the new certs you want to use. Or eventually someone will find security problems with Django 1.11 LTS, and will be on you to fix them. Also, every Django plugin will have migrated to Python 3, so you won't get to use the new tools for it that everyone else is using. And at some point, say 10 years from now, you'll reach your breaking point where you'll get tired of maintaining backports for every. little. package. that you want to you use. And when that day comes, then you'll face the even more daunting task of porting your stuff to the new current version of Python. I'm saying this as one techie to another: don't do this to yourself. Not long term, anyway. If you want to support your own ecosystem for six months or a year as an exercise, sure, I'll be the last one to tell you not to work on a personal project you enjoy. But for Pete's sake, don't engage in this as a long-term project. This isn't how you want to look back on your deathbed and see that you spent a decade. As a practical matter, I'll say that everyone I've spoken to seems to have the experience that Python 3 seems like a pain in the neck for a very short while as you go through the process of finding all the bugs in your codebase that Python 2 was letting you ignore. But once you've done that, you're not going to want to go back and un-fix them even if you decided to stick with Python 2, and if you've already gone through that work, why not enjoy the new language features and 3rd party packages now available to you?
- carapace 7y agoI get what you're saying and I think you're pretty much describing what it will be like. But honestly, I'm kind of looking forward to it. To me it's like maintaining a favorite model train set or something. A labor of love. (Going forward I'm more likely to use Julia, Haskell or Prolog than Python 3 for new code.)
- afiori 7y agoI am interested in your opinion on an idea. What do you think it would have happened if python 3 included a python 2 interpreter (as a command line flag or even a library) so that everyone could switch to python 3. I understand they where almost incompatible as runtimes so it would have doubled size but it would make easier to propagate the diffusion of python 3. Do you think a project such as Bladders would have been still possible had this happened?
- carapace 7y agoI just realized I didn't answer your actual question, sorry. > what is it that you like about Python 2? I came from C and Pascal so from that POV Python is a rich and delicate syntactic and semantic gravy over the same basic functionality plus shell (Python was originally the shell language of the Amoeba distributed OS†). Things that might not seem that big a deal these days were a revelation to me when I started with Python: - The basic datatypes, list, tuple, and dict, are enough to describe so much of the tasks you need to do. - Slice notation is so useful, and works on the left-hand side (you can assign to slices) and the elegance (you can reverse a string or list or tuple by oof = foo[::-1].) - The simple but effective OOP model, "dunderscore" methods, monkey-patching is possible. - How can I forget! Indentation for blocks! So crazy but it works so well. - long ints that don't overflow! So nice. I can go on but really it was the whole thing, the syntax, the semantics, the standard lib. But in my opinion it reach a zenith sometime between 2.4 and 2.7, and even then Python overgrew its ecological niche. (What I mean is that if your project has more than 100,000 lines of Python you're pretty much fucked, but people do that all the time these days. I once worked on a horrible old "lava-flow" enterprisey Python codebase that could have been replaced by Excel but instead employed a gang of programmers. Pure waste.) †https://en.wikipedia.org/wiki/Amoeba_(operating_system) https://en.wikipedia.org/wiki/Amoeba_(operating_system)
- ARandomerDude 7y agoThanks for your thoughtful responses!
- carapace 7y agoCheers!
- depressedpanda 7y agoWhile I agree with most of your points, nothing you said really highlights why python2 is better than python3. (Also, you're definitely not fucked with more than 100k LOC of Python, if the devs know what they're doing. Unit/regression/integration tests, type hinting, and a modular design goes a very long way)
- madeofpalk 7y ago> I just want to keep using Python 2. Honestly curious as to why you would prefer to stay behind?
- privateSFacct 7y agoAnyone with a large python 2 codebase is going to want to stay behind if they could. People still run old FORTRAN from 20 years ago in production. I'm sure some old COBOL code is out there. The reality of not wanting to re-write working code is somewhat real.
- ilikehurdles 7y agoThis is such a good analogy, and really highlights the point that python 2 stalwarts look at organizations hiring for FORTRAN and COBOL today, and say to themselves, "Yes, this is the kind of organization I want to build." An organization that will either (most likely) be completely irrelevant in 10 years time or have to pay a massive premium salary for any engineer that can maintain their systems.
- greglindahl 7y agoNot only are there scientific disciplines where modern Fortran is still dominant, but there isn't much of a salary premium for working there. And people said what you said about it 10 years ago. And 20 years ago. And 30 years ago. When those folks want to do scripting, they mostly use Python. And they mostly use Py3, from what I can see.
- kstrauser 7y agoAre people routinely still purposefully writing new code in 20 year old versions of FORTRAN, or just maintaining existing stuff?
- wiz21c 7y agoit's not on purpose, it's out of necessity. For example, a company has a huge COBOL code base. It plans to migrate to say, python. After 2 years of analysis, and some failures, they realize how much their organisation is driven by the software. So they decide to change their business processses. Another two years of analysis. Now they start rewriting again. After one year, they realize the consluting company responsible for the rewrite is screwing them, they stop the effort. New management comes in : "we need to put more resources in marketing, so we put all IT efforts on hold for two years". Now marketing needs data about its customers, so they ask the IT team to build some reports. This implies coding new stuff in COBOL, after 5+ years... That's what I'm in right now :-)
- kstrauser 7y agoBut... why? Python 3 has been "good enough" since 3.4. By 3.6, it was markedly better than 2. With the upcoming 3.8, it seems to be better in every way (including performance!). I loved Python 2 for a long time. It was a beautiful language. But after seriously using 3, I would never go back. As in, I would turn down job offers involving Python 2 in any other context than "we're hiring you to help us upgrade".
- carapace 7y ago> By 3.6, it was markedly better than 2. Better how? Or better at what? It's likely that our opinions will be different but I've got an open mind and I'm genuinely curious about your experiences and opinion. (I hated PEP 572 at first but then some comment here on HN made me rethink and change my mind.)
- kstrauser 7y agof-strings. Enum. Dataclasses. asyncio. Type annotations as code. An explicit separation between bytes and strings. I love each of these and use them regularly. It's not that 2.7 is some abomination I can't stomach, but more that 3.[recent] is all of the things I appreciated about 2.7, plus a million little quality of life and performance enhancements that make it just that much more pleasant to use. I could live without each of those things individually, but would not be willing to give them all up.
- carapace 7y agoI can understand that (it sounds like me, talking about Python 2, eh?)
- minitech 7y agoFor me, it’s better at avoiding mistakes. The major one is separating bytestrings from strings, of course. Comparison operators not assigning a default order to different types (1 < "2" is now an error) is great. Division is more explicit. Explicit relative imports save me grief. Similar changes about providing APIs that are harder to misuse throughout the standard library.
- 16bytes 7y agoI don't your comment a controversial stance. I don't think the "sunsetting python 2" is controversial either. If there is demand for python2 maintenance, there will be people--like you--working on it and companies selling support for it. All this announcement is saying that the python community at-large (aka "We are volunteers who make and take care of the Python programming language") is focused on python3 and isn't going to work on python2 any more. Their position makes sense, even large communities have limited budgets on development capacity, and they want to spend it only on python3. You control your own capacity, so if you want to focus on python2 you'll likely find some like-minded compatriots.
- richardboegli 7y agoYou've got no contact details on your profile....
- carapace 7y agoI suppose there's no point in putting this off any further, eh? Project repo: https://git.sr.ht/~sforman/Bladders https://git.sr.ht/~sforman/Bladders Mailing list: https://lists.sr.ht/~sforman/bladders-announce https://lists.sr.ht/~sforman/bladders-announce Subscribe: mailto:~sforman/bladders-announce+subscribe@lists.sr.ht At this moment it is total vaporware. I should have some time this week to clone the Python 2 code and set up a virtual server farm to compile it and run test suite on some different platforms, as a start. (Or I just remembered srht has a "builds" tool that might be just the ticket.)