ENH: Move PY2 branch into utils