Support PY2 and PY3 from a single code base