  
              # OGRGeomType does not require GDAL and makes it easy to convert
              # from OGC geom type name to Django field.
              ogr_type = row[2]
              if isinstance(ogr_type, six.integer_types) and ogr_type > 1000:
                  # SpatiaLite versions >= 4 use the new SFSQL 1.2 offsets
                  # 1000 (Z), 2000 (M), and 3000 (ZM) to indicate the presence of
                  # higher dimensional coordinates (M not yet supported by Django).
                  ogr_type = ogr_type % 1000 + OGRGeomType.wkb25bit
              field_type = OGRGeomType(ogr_type).django
 
</s> remove         if isinstance(file, six.string_types) or file is None:
 </s> add         if isinstance(file, str) or file is None: </s> remove                             if hasattr(field_value, '__iter__') and not isinstance(field_value, six.text_type):
 </s> add                             if hasattr(field_value, '__iter__') and not isinstance(field_value, 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         return six.text_type(name)
 </s> add         return str(name) </s> remove         if gtype == 'RASTER' and (value is None or isinstance(value, six.string_types + (dict, self._klass))):
 </s> add         if gtype == 'RASTER' and (value is None or isinstance(value, (str, dict, self._klass))):
            if isinstance(ogr_type, int) and ogr_type > 1000:
  
              # OGRGeomType does not require GDAL and makes it easy to convert
              # from OGC geom type name to Django field.
              ogr_type = row[2]
            if isinstance(ogr_type, int) and ogr_type > 1000:
                  # SpatiaLite versions >= 4 use the new SFSQL 1.2 offsets
                  # 1000 (Z), 2000 (M), and 3000 (ZM) to indicate the presence of
                  # higher dimensional coordinates (M not yet supported by Django).
                  ogr_type = ogr_type % 1000 + OGRGeomType.wkb25bit
              field_type = OGRGeomType(ogr_type).django
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/db/backends/spatialite/introspection.py