                  srid = int(srs_input)
                  srs_input = 'EPSG:%d' % srid
              except ValueError:
                  pass
          elif isinstance(srs_input, six.integer_types):
              # EPSG integer code was input.
              srs_type = 'epsg'
          elif isinstance(srs_input, self.ptr_type):
              srs = srs_input
              srs_type = 'ogr'
 
</s> remove         elif isinstance(srs_input, six.string_types):
 </s> add         elif isinstance(srs_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             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         if isinstance(srid, six.integer_types) or srid is None:
 </s> add         if isinstance(srid, int) or srid is None: </s> remove         elif f.geom_type == 'RASTER' and isinstance(value, six.string_types):
 </s> add         elif f.geom_type == 'RASTER' and isinstance(value, str):
        elif isinstance(srs_input, int):
                  srid = int(srs_input)
                  srs_input = 'EPSG:%d' % srid
              except ValueError:
                  pass
        elif isinstance(srs_input, int):
              # EPSG integer code was input.
              srs_type = 'epsg'
          elif isinstance(srs_input, self.ptr_type):
              srs = srs_input
              srs_type = 'ogr'
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/srs.py