                  for g in geom:
                      capi.add_geom(self.ptr, g.ptr)
              else:
                  capi.add_geom(self.ptr, geom.ptr)
          elif isinstance(geom, six.string_types):
              tmp = OGRGeometry(geom)
              capi.add_geom(self.ptr, tmp.ptr)
          else:
              raise GDALException('Must add an OGRGeometry.')
  
 
</s> remove                 raise ValueError('String or unicode input unrecognized as WKT EWKT, and HEXEWKB.')
 </s> add                 raise ValueError('String input unrecognized as WKT EWKT, and HEXEWKB.') </s> remove         elif isinstance(unique, six.string_types):
 </s> add         elif isinstance(unique, str): </s> remove         elif isinstance(value, six.integer_types + six.string_types):
 </s> add         elif isinstance(value, (int, str)): </s> remove                 v = six.text_type(v)
 </s> add                 v = str(v) </s> remove         if not isinstance(self.file_path, six.string_types):
 </s> add         if not isinstance(self.file_path, str):
        elif isinstance(geom, str):
                  for g in geom:
                      capi.add_geom(self.ptr, g.ptr)
              else:
                  capi.add_geom(self.ptr, geom.ptr)
        elif isinstance(geom, str):
              tmp = OGRGeometry(geom)
              capi.add_geom(self.ptr, tmp.ptr)
          else:
              raise GDALException('Must add an OGRGeometry.')
  
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/geometries.py