          `connection` can be either a real connection or a connection alias.
          """
          if self.proxy or self.swapped or not self.managed:
              return False
          if isinstance(connection, six.string_types):
              connection = connections[connection]
          if self.required_db_vendor:
              return self.required_db_vendor == connection.vendor
          if self.required_db_features:
              return all(getattr(connection.features, feat, False)
 
</s> remove         elif isinstance(other, six.string_types):
 </s> add         elif isinstance(other, str): </s> remove         if isinstance(other, six.string_types):
 </s> add         if isinstance(other, str): </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 not isinstance(lookup_view, six.string_types):
 </s> add     if not isinstance(lookup_view, str): </s> remove         str_instance = isinstance(geom_input, six.string_types)
 </s> add         str_instance = isinstance(geom_input, str)
        if isinstance(connection, str):
          `connection` can be either a real connection or a connection alias.
          """
          if self.proxy or self.swapped or not self.managed:
              return False
        if isinstance(connection, str):
              connection = connections[connection]
          if self.required_db_vendor:
              return self.required_db_vendor == connection.vendor
          if self.required_db_features:
              return all(getattr(connection.features, feat, False)
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/options.py