Finished porting 30 repos to python 3 AMA
Most changes are easy to fix automatically.
Print statements
Relative to absolute imports
Filter/map/dict.items/apply/range
Standard library reorganization
Exception catching syntax





A few things were surprising:
Changes to division were rare (nobody relied on the old integer division).
Python 3.3 introduced hash randomization!
namedtuples lost __dict__ as a member.
In Python 2 `None < 0` is True. In 3, `None < 0` raises an error.





I wrote this shell script to automatically apply changes using futurize ( https://python-future.org/futurize.html ) that make code Python3 with Py2-reverse compatibility while running tests on changes and documenting them with Git. It worked well for me. https://github.com/tdhopper/auto-futurize
Mercurial's Journey to and Reflections on Python 3
https://gregoryszorc.com/blog/2020/01/13/mercurial%27s-journey-to-and-reflections-on-python-3/
https://gregoryszorc.com/blog/2020/01/13/mercurial%27s-journey-to-and-reflections-on-python-3/