Hacker News new | ask | show | jobs
by newen 2517 days ago
Seriously though, why would a company want to start a months long project of moving from python 2 to 3, when their current setup works perfectly, and the project involves the horrifying boring chore of going through every single line of code and making simple changes, and hope that their tests still works, there are no edge cases that crop up due to minor changes in the new version, etc., etc., etc. Seems much more sensible to stick with something that works.
2 comments

Well, because you're developing against an unsupported runtime. No bug or security updates. If that's fine for you, feel free, otherwise get with the (supported) program.

If it's a new project, there are no excuses imho

In addition I don't think you'd have to interrogate every line, depending on your codebase and upstream module support for Python 3. There are tools like:

http://python-future.org/automatic_conversion.html and https://python-modernize.readthedocs.io/en/latest/

Which should get you most of the way there. Look at https://docs.python.org/3/howto/pyporting.html for more info

I would argue I am coding against a stable runtime. No unexpected bugs due to upgrading. No need to worry about upgrading. For many applications, I don't have to worry about security updates. I think for many cases like closed systems that plan to run for years to decades, python 2 is attractive to even new projects.
The question at this point is: why haven’t you migrated yet?

Any new code written in the last 5 years should have been Python 3 compatible (and tested).

If you’re on Python 2 you’re on a dying platform. If your code is important plan accordingly... something many have failed to do.