Pick the low-hanging fruits towards python3 compatibility