3 ms·
There is also a good transition story for porting code from Python 2 -> 3. The "problem" is largely a community issue: libraries with many dependents and a lack
by agentultra 11y ago
There is also a good transition story for porting code from Python 2 -> 3. The "problem" is largely a community issue: libraries with many dependents and a lack of authors to port them, institutions with large code-bases unwilling to port, and so forth.
The tooling hasn't been the problem. There are compatibility libraries (ie: six), source transformation tools (ie: 2to3), and plenty of books, blog posts, and talks on how to manage supporting both version of Python or doing a full port.
- sreque 11y agoHow is it straightforward? I tried porting a very small codebase from python 2 to 3 and ran into a bunch of issues which required manual workarounds. If it were easy to port, most library owners would have done so already.
- agentultra 11y agoI guess it depends on your idea of straight-forward. If you mean, "press a button and everything is done for me," then it's not very straight-forward. If you want to port there's a well-tested and clear path. There are enough big libraries out there that have managed it. There is no real barrier as the OP suggested in their article.
- sreque 11y agoMy belief is that the effort os a linear function of your code base size. This means the larger the code base, the more effort required to port. Also, porting is made more difficult by the fact that Python is a dynamic language, so a lot of errors that could be caught at compile time will only be catchable through a thorough testing suite. I have seen little evidence to suggest that porting from Python 2 to 3 is actually straightfoward in the sense of not requiring significant effort proportional to the size of the code base.
- agentultra 11y agoBelieve what you will but the numbers suggest that it's not a technical problem to port a Python code base. It does take effort and work but it's "straight forward" in the sense that what is required is well known.
- oblio 11y agoAren't we past the tipping point? I think that at this point most old projects won't ever move to Python 3, but for new projects it's at least 50-50. If not >50 for Python 3.