Hacker News new | ask | show | jobs
by symlinkk 4193 days ago
Sorry but this misses the point. The biggest reason Python 3 isn't being used is because most libraries haven't been updated to support it.
5 comments

I feel like the balance has tipped in the past six months. I started my current project two years ago and stuck with Python 2 because I was concerned about library compatibility.

The Python 2 standard library is now showing its age. Limitations with the multiprocessing module on Python 2 drove me to look into the possibility of switching to Python 3 and I was pleasantly surprised to discover all ~45 packages my project depended on had been ported (through caniusepython3.com.)

Porting to 2/3 compatible code with python-future.org turned out to be fairly painless so I expect to make the change soon.

The transition has been a painful one, but I'm sure that these sort of problems will feel a thing of the past in a year or two.

Check out https://python3wos.appspot.com/ . The majority of major packages have been ported over. Most of the bigger stuff is often run independently and not actually imported by other code (sentry, supervisor, ansible... to name a few).
That situation has improved. For a long time, the libraries for a MySQL database and for parsing HTML were completely different on Python 2 and 3. Now, at least, there are libraries for those operations that work on both platforms. It's taken years for that to happen, though. I'm considering porting a production Python 2.7 system, and it now looks feasible to convert it to using different packages on 2.7, then convert to Python 3.x.
Agree with the other people replying. I tried twice in the past to switch but always got stuck at some important nonported package. Recently, however, I jumped in and was mesmerized that i) most packages worth installing are already ported to py3, and ii) py3 has some sweet things that I didn't got with 2.7 that make it worth it.
That may have been the reason awhile back, but it's not the case for the vast majority of projects these days. Though the stigma may still be a major cause for lack of traction.