Move to 2.7 first, which should be fairly easy. From there, moving on to 3.x is much easier.
back
1 comments
Agreed. Once I made the mental decision to stop supporting Python < 2.7, I ended up with at least one code base that runs under both 2.7 and 3.2. Switching to print() ("from __future__ import print_function"), basing error objects on Exception instead of StandardError, and wrapping loops over .items() or .keys() with list() were the only significant changes, and all of the above are available in 2.7. Runtime for a typical job was marginally slower (8-11%) in my testing with 2.7 vs. 3.1; more than acceptable for me.
(There's some variation in output, thanks to Unicode, but it's a variation that this project could live with.)