basestring -> six.string_types
xrange compat.
Updated the source code extraction to python3.
Python 3 compatible exception handling.
Another str/bytes fix
Skip UDP tests for python3.