7 ms·
Migrate to Python 3 Now, There's Little Time Left
- phendrenad2 7y agoI don't get this. Python is open-source. Surely volunteer programmers don't need the blessing of Guido to continue working on Python 2. And surely the number of people who are still using Python 2 somehow indicates that there will be some people among them capable of updating and maintaining Python 2. I don't think time is "running out" at all, at least not in a sense that is meaningful to people still using Python 2, after this many dire, repeated warnings to switch now.
- dagw 7y agoThere are a couple of projects focusing on continuing development of python 2, and possibly backporting python 3 feature where it makes sense. https://github.com/naftaliharris/tauthon https://github.com/naftaliharris/tauthon seems to be the one with the most support. The other problem is that it's not only your python version that won't see official upgrades, but most of the libraries you use won't either. But I guess if you're OK with Python 2 you're probably also OK with out of date versions of django and numpy or whatever else you use. But basically, anybody who hasn't at least started their python 3 port by now have probably already weighed the pros and cons and decided that they're never going to do it, and yelling at them isn't doing anybody any good
- saskia 7y agoI'm sure this will happen, but I'm also sure the major PyPI packages will stop supporting Python 2, so you'll be running old versions of those, with no feature and security updates.
- pjmlp 7y agoBecause as it has been proven multiple times, the amount of volunteers that might step up won't be enough to keep it going.
- jdormit 7y ago> It's not hard to upgrade your code People keep writing blog posts about how easy it is to migrate your code, and I just can't imagine that these people have any experience maintaining a Python2 codebase outside of toy projects or libraries. At work I maintain a Python2 codebase that's been under development since 2016. It's huge, relies on now-deprecated Py2-only libraries that we can't realistically switch away from, full of Py2-specific syntax, and reliant on Py2's handling of Unicode strings. We scoped out what it would be like to upgrade it to Py3, and determined that we would basically need to rewrite large parts of it from scratch. This isn't an acceptable trade-off for the business in terms of development time and priorities. Instead we are slowly breaking out the monolith's functionality into Py3 services, which is much more tightly-scoped (and more palatable for management). But realistically speaking we will be maintaining Py2 code for the foreseeable future, and I can't imagine we are the only company in this situation. Upgrading a production codebase from Py2 to Py3 isn't easy, or even possible in some cases. And frankly, all these blog posts suggesting that migration is trivial are insulting.
- t-writescode 7y agoIf the code base started its development in 2016, why did they choose python 2 over python 3?
- jdormit 7y agoI wasn't at the company at that time, so I don't really know. Sure would have made my life easier if they had... EDIT: Just checked, looks like the first commit was in 2015. But Py3 was still an option back then :(
- nineteen999 7y agoWe have a similar situation - we had a programmer working in a very silo'd manner, writing lots of Python2 code back in 2013/2014. He's since left the company, and while I'm relatively comfortable with Python, there is now a lot of residual Python2 code that will have to be updated to Python3 or rewritten in another language before our next refresh. By contrast, some of the Perl6 code we have hanging around for various tasks has aged much better.
- musicale 7y ago"from python2 import {__some_old_feature__}" could go a long way toward easing the transition. Disclaimer: I spent a lot of time converting things from python2 to python3. It's a big pain. Pet peeve: don't break compatibility for ideological reasons. For example, the print statement didn't need to die: it could have lived on as needed side-by-side with the print() function.
- chc 7y agoI don't get that pet peeve. There are aspects of converting Python 2 to Python 3 that can be hard, but print statements are really not one of them as far as I've seen. Converting print statements to print function calls can be done mechanically. I guess it's fair to say the print statement didn't need to die, but it really didn't need to live either.