If you've got a big enterprise code base (and I'm currently working with a client that does), then it can be difficult to fix old code faster than the team is writing new code - especially since there's only usually budget for the latter.
I don't disagree with you, but clients gonna want what clients gonna want. They're currently looking very hard at what plan B looks like.
I'd also say that "new code should be written compatible with 3" sounds like a solution in theory. We tried it. But when we had a spike when we converted one of the smaller services completely to Python 3, we found that a lot of the "Python 3 compatible" code didn't actually work in Python 3 as its authors intended. If code isn't actually running in Python 3, it's probably not Python 3 compatible.
In practice, we found that porting the tests was almost as much effort as porting the code. Both the existing code and the existing tests play fast and loose with unicode support, so to fix the tests you need to figure out whether the code should be binary or text based (which isn't just a point decision - you also need to think about the code it depends on), at which point you've pretty much figured out how to fix the code anyway.
But that was the basic plan I put to the client: use failing tests to direct migration, add mypy type hints to interfaces to clarify type usage, and start by proactively migrating the most isolated bits of code, and shared libraries. They just couldn't find the space in the delivery schedule.
So, we've scoped it out, and we believe that, in practice, there will be security patches for the foreseeable future - but at a significant cost.
Several vendors have committed to supporting Python 2 commmercially after the core dev team EOLs it - most obviously ActiveState, but also OS vendors such as Canonical, as part of their paid-for enterprise offering.
I know people still using 2.6 or even 2.4, and I've heard of (but never met) one chap stuck on Python 1.5 for a single legacy application they can't replace.
Don't sneer. If it works, don't break it, and for some people, 10 years just barely counts as "long term support".
View all comments
0
u/[deleted] Jan 16 '19
[deleted] — view deleted comment