copy latest changes from python3 to v2