开发者

Tool like 2to3, except for merges

开发者 https://www.devze.com 2022-12-11 05:51 出处:网络
I maintain a f开发者_StackOverflow中文版ork of my project for Python 3.1. When I initially made the port from 2.6, I used 2to3, but now I constantly have to merge new code from the 2.6 fork into the 3

I maintain a f开发者_StackOverflow中文版ork of my project for Python 3.1. When I initially made the port from 2.6, I used 2to3, but now I constantly have to merge new code from the 2.6 fork into the 3.1 fork. How can I perform the 2to3 operation on these merges automatically? (I use git, if it matters.)


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

Alternatively, perhaps this pain will make you reconsider your strategy of maintaining two distinct branches for the two Python versions? I've had good luck using a single codebase for both versions: Running the same code on Python 2.x and 3.x

0

精彩评论

暂无评论...
验证码 换一张
取 消