      _format_cache[cache_key] = val
      return val
  
  
  get_format_lazy = lazy(get_format, six.text_type, list, tuple)
  
  
  def date_format(value, format=None, use_l10n=None):
      """
      Formats a datetime.date or datetime.datetime object using a
 
</s> remove                 val = six.text_type(val)
 </s> add                 val = str(val) </s> remove             u_params = tuple(to_unicode(val) for val in params)
 </s> add             u_params = tuple(to_string(val) for val in params) </s> remove             u_params = {to_unicode(k): to_unicode(v) for k, v in params.items()}
 </s> add             u_params = {to_string(k): to_string(v) for k, v in params.items()} </s> remove         if isinstance(value, six.string_types):
 </s> add         if isinstance(value, str): </s> remove             if not isinstance(val, six.string_types) and val is not None:
 </s> add             if not isinstance(val, str) and val is not None:
get_format_lazy = lazy(get_format, str, list, tuple)
      _format_cache[cache_key] = val
      return val
  
  
get_format_lazy = lazy(get_format, str, list, tuple)
  
  
  def date_format(value, format=None, use_l10n=None):
      """
      Formats a datetime.date or datetime.datetime object using a
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/utils/formats.py