Use the more modern six
library to handle urllib
, cStringIO
, and cPickle
.
The urlparse
, urllib
, and urllib2
modules have been significantly reworked in
Python 3 to provide a much more consistent interface.
Additionally, the 'fast' versions of StringIO
and pickle
are now merged with
the 'slow' versions, so in the future we'll be able to just use io.StringIO
and
pickle
without the fallbacks.
six
has some adaptations to help with this for the time being. It's not as
pretty as I would like, but it works.