Python 3 and IPv6 are the poster-children of how _not_ to do a major upgrade. I'm not sure what the right way is, but if the short-term advantages of the upgrade do not outweigh the immediate pain, prepare for the matter to drag out for _decades_.
Hopefully no more people will keep saying "learn Python 2 because 3 has almost no packages".<p>It is so easy for people to just repeat what they heard even if that idea originated a decade ago and was valid a decade ago.<p>And that way we got into a mess of not migrating until pass the time it is no longer supported...
I've been doing a lot of Python 2 -> 3 lately, and found this to be one of the best actionable guides: <a href="https://portingguide.readthedocs.io/en/latest" rel="nofollow">https://portingguide.readthedocs.io/en/latest</a><p>Also, using tox on the project to run tests against both python 2.7 and multiple versions of 3 and the work goes pretty quickly.
We built a product with an embedded Jython interpreter. Jython is stuck on Python2 and somewhat abandoned. So that's nice.<p>Re: packages, one of the huge advantages of the C ecosystem has been that compiled packages are <i>usually</i> fine across language transitions, not only between major compiler version numbers but even from C to C++ which are much more different languages than Python2 to 3. How different would the Python transition have been if it were possible to load Python2 packages in a Python3 program?
Isn't it ironic that Sentry is one of the tools mentioned in py2->py3 migration? (Sentry is on py2 and as far as I remember they were not very optimistic about migrating)
The big issue of ports like these is not the tutorial but to justify that to your boss.<p>From enterprise to a self run startup you have to see if it’s worth it .
IIRC, the Python used in the macOS vim(1) is still 2.x. So at least on a Mac it won't be possible to just move on to Py3 and forget / uninstall Py2 for the foreseeable future.
Porting is a non-event for most non-large projects. In short:<p>- First cut a new major version<p>- Write a few tests if needed, they go a long way here.<p>- Update to 2.7 best practices and logging<p>- Run tests, commit<p>- Add a few future statements, commit<p>- Run pyflakes3 on it, fix, commit<p>- Run under 3.x/fix until clean, commit<p>However, if your project is huge and/or does a lot of string and bit twiddling it's excruciating. Hence the controversy between factions.