      def __init__(self, type_input):
          "Figures out the correct OGR Type based upon the input."
          if isinstance(type_input, OGRGeomType):
              num = type_input.num
          elif isinstance(type_input, six.string_types):
              type_input = type_input.lower()
              if type_input == 'geometry':
                  type_input = 'unknown'
              num = self._str_types.get(type_input)
              if num is None:
 
</s> remove         return six.text_type(self.num)
 </s> add         return str(self.num) </s> remove         elif f.geom_type == 'RASTER' and isinstance(value, six.string_types):
 </s> add         elif f.geom_type == 'RASTER' and isinstance(value, str): </s> remove         str_instance = isinstance(geom_input, six.string_types)
 </s> add         str_instance = isinstance(geom_input, str) </s> remove         elif f.geom_type == 'RASTER' and isinstance(value, six.string_types):
 </s> add         elif f.geom_type == 'RASTER' and isinstance(value, str): </s> remove             expressions.append(self._handle_param(precision, 'precision', six.integer_types))
 </s> add             expressions.append(self._handle_param(precision, 'precision', int))
        elif isinstance(type_input, str):
      def __init__(self, type_input):
          "Figures out the correct OGR Type based upon the input."
          if isinstance(type_input, OGRGeomType):
              num = type_input.num
        elif isinstance(type_input, str):
              type_input = type_input.lower()
              if type_input == 'geometry':
                  type_input = 'unknown'
              num = self._str_types.get(type_input)
              if num is None:
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/contrib/gis/gdal/geomtype.py