Add python3 compat boilerplate to executor