Tool like 2to3, except for merges

I support the fork of my project for Python 3.1. When I originally made the port with 2.6, I used 2to3, but now I constantly have to combine the new code from the 2.6-fork into a 3.1-plug. How can I perform 2to3 operation during these merges automatically? (I use git if that matters.)

+4
source share
1 answer

Hmmm, you are in a tough position. Perhaps you can run 2to3 on a 2.6-fork and then merge the results of this into your 3.1 branch?

Alternatively, perhaps this pain will force you to rethink your strategy of maintaining two different branches for two versions of Python? I was lucky to use the same code base for both versions: Running the same code in Python 2.x and 3.x

+7
source

All Articles