  
      def get_context(self, name, value, attrs=None):
          # If a string reaches here (via a validation error on another
          # field) then just reconstruct the Geometry.
          if value and isinstance(value, six.string_types):
              value = self.deserialize(value)
  
          if value:
              # Check that srid of value and map match
              if value.srid != self.map_srid:
 
</s> remove         if value and isinstance(value, six.string_types):
 </s> add         if value and isinstance(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     if isinstance(value, six.string_types):  # Handle strings first for performance reasons.
 </s> add     if isinstance(value, str):  # Handle strings first for performance reasons. </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     if isinstance(value, six.string_types):  # Handle strings first for performance reasons.
 </s> add     if isinstance(value, str):  # Handle strings first for performance reasons.
        if value and isinstance(value, str):
  
      def get_context(self, name, value, attrs=None):
          # If a string reaches here (via a validation error on another
          # field) then just reconstruct the Geometry.
        if value and isinstance(value, str):
              value = self.deserialize(value)
  
          if value:
              # Check that srid of value and map match
              if value.srid != self.map_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/forms/widgets.py