          # Map the string representation of choices to the underlying value.
          # Allows us to deal with eg. integer choices while supporting either
          # integer or string input, but still get the correct datatype out.
          self.choice_strings_to_values = dict([
              (str(key), key) for key in self.choices.keys()
          ])
  
          super(ChoiceField, self).__init__(**kwargs)
  
      def to_internal_value(self, data):
 
</s> remove             self.choice_strings_to_values[str(item)] for item in value
 </s> add             self.choice_strings_to_values[six.text_type(item)] for item in value </s> remove             return self.represent_scalar('tag:yaml.org,2002:str', str(data))
 </s> add             return self.represent_scalar('tag:yaml.org,2002:str', six.text_type(data)) </s> remove             return str(obj.total_seconds())
 </s> add             return six.text_type(obj.total_seconds()) </s> remove         return str(value).strip()
 </s> add         return six.text_type(value).strip()
            (six.text_type(key), key) for key in self.choices.keys()
          # Map the string representation of choices to the underlying value.
          # Allows us to deal with eg. integer choices while supporting either
          # integer or string input, but still get the correct datatype out.
          self.choice_strings_to_values = dict([
            (six.text_type(key), key) for key in self.choices.keys()
          ])
  
          super(ChoiceField, self).__init__(**kwargs)
  
      def to_internal_value(self, data):
keep keep keep keep replace keep keep keep keep keep
 Use six.text_type instead of str everywhere 
rest_framework/fields.py