The format `y` doesn't exist in older versions of Python and ssh4py is supposed to be compatible with Python >=2.4. Therefore you need a Python version switch here, that looks like below:

```c
#if PY_MAJOR_VERSION < 3
	return Py_BuildValue("s#", hash, size);
#else
	return Py_BuildValue("y#", hash, size);
#endif
```