              self.remote_field.field_name = cls._meta.pk.name
  
      def formfield(self, **kwargs):
          db = kwargs.pop('using', None)
          if isinstance(self.remote_field.model, six.string_types):
              raise ValueError("Cannot create form field for %r yet, because "
                               "its related model %r has not been loaded yet" %
                               (self.name, self.remote_field.model))
          defaults = {
              'form_class': forms.ModelChoiceField,
 
</s> remove         if isinstance(self.remote_field.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, str): </s> remove         return six.text_type("QUERY = %r - PARAMS = %r") % (sql, u_params)
 </s> add         return "QUERY = %r - PARAMS = %r" % (sql, u_params) </s> remove         rel_is_string = isinstance(self.remote_field.model, six.string_types)
 </s> add         rel_is_string = isinstance(self.remote_field.model, str) </s> remove         if isinstance(self.remote_field.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, str): </s> remove         if isinstance(self.remote_field.through, six.string_types) or not self.remote_field.through._meta.managed:
 </s> add         if isinstance(self.remote_field.through, str) or not self.remote_field.through._meta.managed:
        if isinstance(self.remote_field.model, str):
              self.remote_field.field_name = cls._meta.pk.name
  
      def formfield(self, **kwargs):
          db = kwargs.pop('using', None)
        if isinstance(self.remote_field.model, str):
              raise ValueError("Cannot create form field for %r yet, because "
                               "its related model %r has not been loaded yet" %
                               (self.name, self.remote_field.model))
          defaults = {
              'form_class': forms.ModelChoiceField,
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. 
django/db/models/fields/related.py