PyString_AsStringAndSize must accept both unicode and bytes.
Use str on unknown obj for python 3