MAINT: python3 compat. for internal script