              try:
                  paginate_by_param = int(query_params[self.paginate_by_param])
              except (KeyError, ValueError):
                  pass
              else:
                  if self.max_paginate_by is not None:
                      return min(self.max_paginate_by, paginate_by_param)
                  else:
                      return paginate_by_param
  
          if self.max_paginate_by:
              return min(self.max_paginate_by, self.paginate_by)
          else:
              return self.paginate_by
 
</s> remove                 paginate_by_param = int(query_params[self.paginate_by_param])
 </s> add                 return strict_positive_int(
                    self.request.QUERY_PARAMS[self.paginate_by_param],
                    cutoff=self.max_paginate_by
                ) </s> remove         if self.max_paginate_by:
            return min(self.max_paginate_by, self.paginate_by)
        else:
            return self.paginate_by
 </s> add         return self.paginate_by </s> remove             query_params = self.request.QUERY_PARAMS
 </s> add  </s> remove         If max_paginate_by is set, new kwarg should limit requests for review.
 </s> add         If max_paginate_by is set, but client does not specifiy page_size,
        standard `paginate_by` behavior should be used.
              try:
                  paginate_by_param = int(query_params[self.paginate_by_param])
              except (KeyError, ValueError):
                  pass





  
          if self.max_paginate_by:
              return min(self.max_paginate_by, self.paginate_by)
          else:
              return self.paginate_by
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Tweak MAX_PAGINATE_BY behavior in edge case.

Always respect `paginate_by` settings if client does not specify page
size.  (Even if the developer has misconfigured, so that `paginate_by >
max`.) 
rest_framework/generics.py