4 ms·
Agreed. We've got a ~100k line Django project and I'm fairly confident it won't be more than a day or so of work to migrate. The only thing keeping us on 2.x is
by danpalmer 10y ago
Agreed. We've got a ~100k line Django project and I'm fairly confident it won't be more than a day or so of work to migrate. The only thing keeping us on 2.x is our dependencies most of which already have Python 3 support so it's really just a matter of us upgrading dependencies.
- mrfusion 10y agoOne day sounds impressive. What's your strategy?
- danpalmer 10y ago- Most of it can be automated with 2to3. - We already have linting in place that encourages Python 3 compatibility (and have no linter warnings on master). - We already use six for moved modules. - And we have a test suite that is not exhaustive, but 'good enough' to find the common patterns of bug for this kind of thing. - We also have a style-guide that favours the ability to find-replace project wide with relative safety. - We don't have much 'math heavy' code that will fail with the changes in operations in Python 3. - We already use unicode for the majority of strings. - We don't use my Python networking code directly, it's mostly just Requests (so a lot of the moved modules don't apply). This excludes the upgrading of dependencies, I think that's where we will spend more time, but the actual Python 3 transition for the main codebase should be ok, mostly because of the effort we've put into style and review since it started ~5 years ago.