[Sugar-devel] 2to3 vs six

James Cameron quozl at laptop.org
Tue Feb 20 21:33:56 EST 2018


https://lwn.net/Articles/747654

> Anders Hovmöller has posted an account of migrating a large application to Python 3. There were multiple steps on the journey and plenty of lessons learned. "Our philosophy was always to go py2 →py2/py3 → py3 because we just could not realistically do a big bang in production, an intuition that was proven right in surprising ways. This meant that 2to3 was a non starter which I think is probably common. We tried a while to use 2to3 to detect Python 3 compatibility issues but quickly found that untenable too. Basically it suggests changes that will break your code in Python 2. No good. The conclusion was to use six, which is a library to make it easy to build a codebase that is valid in both in Python 2 and 3." 

https://medium.com/@boxed/moving-a-large-and-old-codebase-to-python3-33a5a13f8c99

In comparison, Sugar desktop and toolkit (less activities) is only 75k
lines including blanks and comments.

-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list