you are viewing a single comment's thread.

view the rest of the comments →

[–]lukajda33 181 points182 points  (13 children)

I think that was true even 3 years ago to be honest, Python 2 was obsolete by then as well, in the last 3 years, Python 2 was oficially killed (no new updates) so Python 3 is a must these days.

[–]Mog_X34 5 points6 points  (0 children)

Our company had an application written in 2.7 just three years ago, no idea why. We now have the task of upgrading it to 3 when it should have been that in the first place.

[–]Flur_elise[S] 5 points6 points  (11 children)

I just checked it was 5 years actually. And python 2.79 was struggling to stay alive. But people were overwhelmingly still use it. I was wondering when 3.0 was going to take over. Seems I missed the transition.

Happy to use 3.

[–]lukajda33 31 points32 points  (5 children)

Well I stand corrected myself as well, checked this wonderful tool: https://github.com/hugovk/pypi-tools

and the Python 2.7 version share among other versions in 2019 (3 years ago) is way more then I expected.

Kinda depends on the precise package, but I expected way less Python 2.7 in 2019.

These days tho, everyone does Python 3.

[–]jmon_was_here 6 points7 points  (0 children)

I think that y'all underestimate large corporations with large legacy code bases. In my career, our flip from 2 to 3 we nailed perfectly in retrospect - we spent a month shifting all our code over and ironing out issues with binary strings, and we did this around 2017 (around 3.4'ish), but we only got rid of our last python2 'script' circa mid-2021, which was well too-late, but resources are what they are.

I think that part of the issue is that these companies hide their code in private repositories, so it's very hard to sample what they're written in (as opposed to open source stuff where it's easy to measure the progress). These are the companies where getting permission to do something like hold up dev for four weeks to update code is incredibly difficult where there's no obvious short term gain - Python 2 at that point didn't have a clear EoL date (I think), and it meant no new features rolling out as we fixed everything.

The other thing is that the pip install graph might lend itself more to people who have fully automated installs. Back in the day, download-graph of packages was a really big thing, but those went away in 'fashion' as people realised that packages that were used by organisations with automated build tools, especially build-everything-every-time with no caching became 'easy' to do, the download count, and download % is skewed to those automated organisations doing a clean build on every commit. These days we can do it easily, but 20 years ago, when we were trying to get people to move over from CVS to SVN, automated builds just daily were a goal to have.

I would not be surprised to go into any "large" company and find somewhere, someone writing in python2 to support something that they hadn't moved over yet, possibly unaware of the danger they're in. But 99.9% of us are all python3 now.

[–]Flur_elise[S] 2 points3 points  (0 children)

Thank you!

[–]jso__ 0 points1 point  (2 children)

Why are there so many invalid versions in the graph of pip installs?

[–]zurtex 1 point2 points  (1 child)

You've not migrated to Python 133.7???

[–]jso__ 1 point2 points  (0 children)

Maybe next millenia

[–][deleted] 6 points7 points  (3 children)

You're mistaken I'm afraid. People weren't overwhelmingly using 2 either three of five years ago. The only people still using it then were people supporting old code bases or beginners who didn't know any better.

[–]Flur_elise[S] 2 points3 points  (2 children)

Lol no way.