              return srs.srid
          return None
  
      def _set_srid(self, srid):
          if isinstance(srid, six.integer_types) or srid is None:
              self.srs = srid
          else:
              raise TypeError('SRID must be set with an integer.')
  
      srid = property(_get_srid, _set_srid)
 
</s> remove             if (isinstance(dim, six.string_types) and 'Z' in dim) or dim == 3:
 </s> add             if (isinstance(dim, str) and 'Z' in dim) or dim == 3: </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         elif isinstance(srs_input, six.string_types):
 </s> add         elif isinstance(srs_input, str): </s> remove         elif isinstance(srs_input, six.integer_types):
 </s> add         elif isinstance(srs_input, int): </s> remove         elif value is None or isinstance(value, six.string_types + (six.memoryview,)):
 </s> add         elif value is None or isinstance(value, (str, memoryview)):
        if isinstance(srid, int) or srid is None:
              return srs.srid
          return None
  
      def _set_srid(self, srid):
        if isinstance(srid, int) or srid is None:
              self.srs = srid
          else:
              raise TypeError('SRID must be set with an integer.')
  
      srid = property(_get_srid, _set_srid)
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