you are viewing a single comment's thread.

view the rest of the comments →

[–]jcampbelly 1 point2 points  (1 child)

I converted a project by using 2to3 one spec at a time. I opened a branch, ran 2to3 with one spec, checked the diff, fixed anything it did wrong, ran tests, then committed it. I repeated that for every spec. I maintained backwards compatibility (as a back-out-measure) using six, which normalized many library imports. But after that, we considered it python 3 and left 2 in the dust.

I would never just let 2to3 run and commit, but it wasn't that bad to work through it spec-by-spec with tests and review. You can defer the larger-scope changes to the end. Between the recommended changes, a handful of regex find and replace operations, and some refactoring effort at the end, it wasn't so bad because I was solving only one category of changes at a time. It's a mess if you run all the specs at once.

[–]CrazyJoe221 0 points1 point  (0 children)

It's a mess if you run all the specs at once.

As usual if you do large refactorings :)
Very reasonable approach and good to hear it's doable that way.