Hacker News new | ask | show | jobs
by zdw 2343 days ago
I've been doing a lot of Python 2 -> 3 lately, and found this to be one of the best actionable guides: https://portingguide.readthedocs.io/en/latest

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.

1 comments

Looks like a lot of the guide assumes you want to run on Py2 and 3 concurrently. The time for that has passed to be honest. A clean port is easier to do.
For larger code bases making direct jump straight to Py3 that breaks Py2 compatibility without a transitional period can be problematic especially if it's a library.

The time may have passed, but lots of code is still out there that needs to be updated.

Maintaining two branches shouldn’t be a problem. If you waited this long to port, velocity on the legacy branch can’t be especially high.

Now that I think of it the legacy branch should be eol soon.