              raise ImproperlyConfigured(
                  '{0} is missing the permission_required attribute. Define {0}.permission_required, or override '
                  '{0}.get_permission_required().'.format(self.__class__.__name__)
              )
          if isinstance(self.permission_required, six.string_types):
              perms = (self.permission_required, )
          else:
              perms = self.permission_required
          return perms
  
 
</s> remove         if isinstance(perm, six.string_types):
 </s> add         if isinstance(perm, str): </s> remove         if not isinstance(self.file_path, six.string_types):
 </s> add         if not isinstance(self.file_path, str): </s> remove             if isinstance(reply_to, six.string_types):
 </s> add             if isinstance(reply_to, str): </s> remove         if isinstance(srid, six.integer_types) or srid is None:
 </s> add         if isinstance(srid, int) or srid is None: </s> remove                 '"%s" is not a valid regular expression: %s' %
                (regex, six.text_type(e))
 </s> add                 '"%s" is not a valid regular expression: %s' % (regex, e)
        if isinstance(self.permission_required, str):
              raise ImproperlyConfigured(
                  '{0} is missing the permission_required attribute. Define {0}.permission_required, or override '
                  '{0}.get_permission_required().'.format(self.__class__.__name__)
              )
        if isinstance(self.permission_required, str):
              perms = (self.permission_required, )
          else:
              perms = self.permission_required
          return perms
  
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/auth/mixins.py