py3 adapt