Itseez/opencv — pull request #1767 by prattmic (2013-11-08 05:35:10+00:00)
Title: Support PyString_AsString() in Python 3 < 3.3

In Python 3, version 3.3+, PyUnicode_AsUTF8() provides similar
functionality to Python 2's PyString_AsString().

In older versions of Python 3, there is no public function to provide
the same functionality. However, the "internal" _PyUnicode_AsString()
does provide that functionality, so use it to replace
PyString_AsString().

With this patch, cv2 should compile for Python 3.[0-2].