Python 3 compatibility: PyInt -> PyLong
Only check for PyInt on python 2
Python 3 compatibility: getattro/setattro
Python 3 compatibility: type and module changes
Do not call PyObject_GenericSetAttr.

For whatever reason doing that results in "del curl.attr" complaining that
attr does not exist. If instead I call PyDict_DelItem, everything seems
to be peachy.
Need to convert KeyError to AttributeError
Limit file code path to python 2.

On python 3 the files are no longer C FILE pointers, so this code does not work.

However, it continues to work fine on python 2.
Implement writing to files under python 3
Test treating a file-like object as a file, on all pythons
Define python 2/3 compatibility defines for DRY code
Python 3 support: Unicode in strings
Naive implementation of Unicode to C string conversion that leaks memory
An implementation of Unicode to C string conversion that does not leak memory.

This however requires it to take an additional argument for the
encoded string, that the caller is responsible for freeing.
Unicode version of PyString_AsString_NoNUL.

This one also gives the caller an encoded bytes object to dispose of.
Macros for dealing with encoded string objects
Memory management for Unicode to C string conversions
Handle bytes and unicode in read callback
Encoding multibyte data is not going to work well, only allow ascii
Make exception message more descriptive
Send bytes to write callback under python 3.

This is the only way to pass non-ascii response bodies to
write callbacks without mangling/destroying them, because
encoding is given in headers which are entirely separate
from the body.