Python 3's native API has a number of incompatibilities with Python 2's. Most of these incompatibilities are hidden inside of the various PythonObject classes, but our swig typemaps and interfaces use Python native APIs directly.
This patch addresses the first of these incompatibilities, the use of PyString_FromStringAndSize. It is fixed by changing these to use `PythonString. It's possible more work may need to be done here in the future because there are still numerous calls to native Python APIs from the swig typemaps, but for now this is the minimum amount of work necessary to get a successful compilation under Python 3.
The second of these incompatibilities, the use of various PyFile_xxx functions, will be addressed in a followup patch.