      class Meta:
          unique_together = (("repository", "revision"),)
  
      def __str__(self):
          return "%s (%s)" % (self.revision, six.text_type(self.repository))
  
  
  # models for testing callable defaults (see bug #7975). If you define a model
  # with a callable default value, you cannot rely on the initial value in a
  # form.
 
</s> remove             six.text_type(f.media),
 </s> add             str(f.media), </s> remove         if value and isinstance(value, six.string_types):
 </s> add         if value and isinstance(value, str): </s> remove         if value and isinstance(value, six.string_types):
 </s> add         if value and isinstance(value, str): </s> remove         return six.text_type(self.num)
 </s> add         return str(self.num) </s> remove     if not isinstance(lookup_view, six.string_types):
 </s> add     if not isinstance(lookup_view, str):
        return "%s (%s)" % (self.revision, str(self.repository))
      class Meta:
          unique_together = (("repository", "revision"),)
  
      def __str__(self):
        return "%s (%s)" % (self.revision, str(self.repository))
  
  
  # models for testing callable defaults (see bug #7975). If you define a model
  # with a callable default value, you cannot rely on the initial value in a
  # form.
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/model_formsets/models.py