Steps

Run python-modernize on the Python files matching the INCR ticket you're working on, to make the code more compatible with Python 3.x without breaking Python 2.7 support:

Tips

The python-modernize utility from the modernize package is very useful for quickly updating Python 2 code to also support Python 3, but the changes it makes aren't always ideal (or even correct).  Here are some tips on how to improve its output.

If you have to make other changes to the code generated by python-modernize, please note them here.