enable python3 tests
tidy python version determination
XXX modfy source for py3 only compat