Use string_types rather than basestring.
Use six.text_type rather than a unicode literal.