2to3 really showed that Python didn't understand their audience. If they had started a new project called COBRA and just eventually had it over take python the world would be all over it. But massive breaking changes going from 2 to 3 was a disaster for their audience. Worse still you could hear the acrimony in Pythons communications on the topic.
I'm wondering, is there work on how python 3's changes could have been promoted in smoother way?
Python 2 removed from Debian
111–120 of 513 posts
Re: Python 2 removed from Debian
#112Earlier quoted context omitted.
> there isn't a single piece of code that I ever put together that worked longer than a few years out of the box without some breaking change The best practice, which prevents this issue, is to use envs, (as well as pinning your dependencies for any given project in a committable artifact). (Seems like a lot of people are using system Python, which isn't really recommended.)
I started a project in 2016 and used pipenv to freeze all the dependencies. A few weeks ago, I could not get it working on a new machine. Apparently the new system python broke some of the libraries. I had also pinned the python version in pipenv, but it seems like pipenv can only install python versions that are not too old. I really like the language, but all the tooling is seriously broken.
Re: Python 2 removed from Debian
#113And as we speak, I upgrade to 3.10 only to see my dependencies break and wonder if they have learnt anything at all.
I don't think there are any breaking changes in Python 3.10? Sounds more like a package management issue.
3.8 is a bigger C ABI roadblock than 3.10.
Re: Python 2 removed from Debian
#114Earlier quoted context omitted.
I don't think there are any breaking changes in Python 3.10? Sounds more like a package management issue.
At least they removed something that had been deprecated ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
Re: Python 2 removed from Debian
#115Earlier quoted context omitted.
Doesn't this say something about the language if it's been so difficult for people to migrate from 2 to 3? Yes, it was a major version change, but it doesn't bode well for arguments that Python is a good language to do long-term, maintainable, and large-scale development. Sure, now things are "settled" with 3, but Python continues to get more features. It just doesn't look good for the language if even doing a langua…
Let me be blunt here: Python sucks, but that's at the level of 'programming languages people complain about and programming languages nobody uses'. However the Python libraries absolutely rock and the ease with which you can get really performant number crunching code out of what is nominally an interpreted language is amazing. Statistics, machine learning, engineering, the notebooks etc, I would not pick anything el…
Re: Python 2 removed from Debian
#116Earlier quoted context omitted.
Probably not. Java is going through the same exact thing with Java 8 right now. The issue is that humans don't plan ahead for when the software they use inevitably goes EOL, be it programming languages, libraries, or operating systems, and so only really do so when forced (sometimes only after a security incident). In the case of Python 2 and Java 8, the problem was/has been exacerbated by the organization supporting…
> So why would anyone decide, much less how would one justify to a corporate overlord, to spend all the time and resources to refactor their code, upgrade libraries (assuming the libraries themselves upgrade), update build systems, perform extensive regression testing, and everything else, just for a version that would be EOL one year after what they just upgraded from? The longer you delay upgrades, the bigger the d…
Re: Python 2 removed from Debian
#117print "goodbye, sweet prince" I've been slowly porting a lot of my legacy code from 2 to 3 on an as-needed basis, there's a few bits though that are just too huge/crusty/etc that they will never get ported.
I can't even imagine what terrible hacks you had to spawn to be able to claim this.
Lots of abuse of how weakly/poorly/forgivingly typed Py2 is.
Doing the same processes in Py3 is actually headache inducing because of the much stronger typing system.
Re: Python 2 removed from Debian
#118Re: Python 2 removed from Debian
#119And as we speak, I upgrade to 3.10 only to see my dependencies break and wonder if they have learnt anything at all.
I don't think there are any breaking changes in Python 3.10? Sounds more like a package management issue.
When I worked on patching/rebuilding all the Python packages for Alpine's upgrade to Python 3.10 I remember quite a few things being broken and needing patches (maybe about 5% of the overall packages), but a lot of those were also test failures due to the new deprecations, so while some stuff did truly break, it was pretty rare.
[1] https://docs.python.org/3/whatsnew/3.10.html (see the removed section especially)
Re: Python 2 removed from Debian
#120Earlier quoted context omitted.
pyenv will make your life easier in this regard. that is all.
Pipenv has pyenv integration. It just doesn't work with python 3.6 on my machine. My guess is that it tries running pipenv itself with the old interpreter and is no longer compatible. In any case, faffing around with 25 different third-party solutions is a horrible developer experience.
Fwiw what I've settled on that seems the most stable is to use pyenv as the "outer layer", as it shims the python interpreter along with any venvs so you don't get conflicts / heisen-incompatibility. Lets you use anaconda envs as children as well. The real trick, I think, is to pick one system as the canonical master env controller and don't deviate.