use PY3 detection from compat module instead of client