On 11/6/13 4:27 AM, Werner F. Bruhin wrote: > Hi all, > > I should have studied the 2to3 stuff more, it makes changes which mean that > keeping > the code base compatible with Py2 and Py3 a bit of a pain. > > I think this was all a good exercise but to go forward I think the 2to3 > conversion > should be done again - but if possible I wouldn't want to loose all the work > done in > the mean time. > > Thinking of something along these lines: > > 1. start with the commit before running 2to3 > 2. change some things to use six, e.g. 'basestring' to > 'six.types.STRINGTYPES', > 'six.moves.*' and others to be defined > 3. run 2to3 but only a selection of the fixers instead of all of them (e.g. > 'import', > 'buffer' but not 'unicode') - > http://docs.python.org/3.3/library/2to3.html#to3-fixers > 4. apply some commits (e.g. the 'rename' commits) which where done after the > first > 2to3 commit which should get us again to 'today' > > What do you think?
It sounds sane. You could checkout the commit before running 2to3 to a new local branch, make and commit the new changes you want to put in there, and then cherry-pick selected commits from phoenix that you don't want to lose. Finally, revert phoenix back to pre-2to3, merge from the temporary branch, and delete the temporary branch. Pray you don't have lots of merge conflicts though. :) Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
