repair: Support Python 3