Journey to migrate python2 projects to 3
Channel: DevConf
Date: 17/02/2019

Presentation name: Journey to migrate python2 projects to 3
Speaker: Chunfu Wen
Description:  python2 will not be supported in the visible future.
However,existing script, projects need migrate to python3 while keeping compatibility with 2.
This is quite challenging work since almost all Python 2 programs require some modifications to run properly under 3.
We are working on avocado-vt and tp-libvirt projects migrating,and nearly 650 files were changed without interrupting production.
This talk will share our best practice experience and the pain points encountered:
1)Define migration strategies
2)Best Practices in idioms,including exceptions,importing,standard library numbers,dictionaries,Built-in Function change,etc...
3)Some automatic tools to help migration:sixer,2to3
4)Use virtualenv to set up validating environments
5)Special case handling: deprecated module removal
[ https://sched.co/Jccx ]