              return bytes()
  
          renderer_context = renderer_context or {}
          indent = self.get_indent(accepted_media_type, renderer_context)
          separators = (',', ':') if (indent is None and self.compact) else (', ', ': ')
  
          ret = json.dumps(
              data, cls=self.encoder_class,
              indent=indent, ensure_ascii=self.ensure_ascii,
              separators=separators
 
</s> remove from rest_framework.compat import StringIO, smart_text, yaml
 </s> add from rest_framework.compat import (
    SHORT_SEPARATORS, LONG_SEPARATORS, StringIO, smart_text, yaml
)
        separators = SHORT_SEPARATORS if (indent is None and self.compact) else LONG_SEPARATORS
              return bytes()
  
          renderer_context = renderer_context or {}
          indent = self.get_indent(accepted_media_type, renderer_context)
        separators = SHORT_SEPARATORS if (indent is None and self.compact) else LONG_SEPARATORS
  
          ret = json.dumps(
              data, cls=self.encoder_class,
              indent=indent, ensure_ascii=self.ensure_ascii,
              separators=separators
keep keep keep keep replace keep keep keep keep keep
 Ensure json.dumps(separators=...) works on both 2.x and 3.x 
rest_framework/renderers.py