      """
      A File-like object that takes just raw content, rather than an actual file.
      """
      def __init__(self, content, name=None):
          stream_class = StringIO if isinstance(content, six.text_type) else BytesIO
          super(ContentFile, self).__init__(stream_class(content), name=name)
          self.size = len(content)
  
      def __str__(self):
          return 'Raw content'
 
</s> remove         return six.text_type("QUERY = %r - PARAMS = %r") % (sql, u_params)
 </s> add         return "QUERY = %r - PARAMS = %r" % (sql, u_params) </s> remove         return six.text_type(self.biggie)
 </s> add         return str(self.biggie) </s> remove     return line == ('\n' if isinstance(line, six.text_type) else b'\n')
 </s> add     return line == ('\n' if isinstance(line, str) else b'\n') </s> remove             lists = [[six.text_type(r) for r in b.read_by.all()] for b in author.books.all()]
 </s> add             lists = [[str(r) for r in b.read_by.all()] for b in author.books.all()] </s> remove     return line.endswith('\n' if isinstance(line, six.text_type) else b'\n')
 </s> add     return line.endswith('\n' if isinstance(line, str) else b'\n')
        stream_class = StringIO if isinstance(content, str) else BytesIO
      """
      A File-like object that takes just raw content, rather than an actual file.
      """
      def __init__(self, content, name=None):
        stream_class = StringIO if isinstance(content, str) else BytesIO
          super(ContentFile, self).__init__(stream_class(content), name=name)
          self.size = len(content)
  
      def __str__(self):
          return 'Raw content'
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/core/files/base.py