Migration from python2 to python3