              ('results', data)
          ]))
  
      def get_next_link(self):
          if not self.page.has_next():
              return None
          url = self.request.build_absolute_uri()
          page_number = self.page.next_page_number()
 
</s> remove         self.page_size = self.get_page_size(request)
        if not self.page_size:
 </s> add         if self.page_size is None: </s> remove class BasePageSizePagination(BasePagination):
    # The default page size.
    # Defaults to `None`, meaning pagination is disabled.
    page_size = api_settings.PAGE_SIZE

    # Set to an integer to limit the maximum page size the client may request.
    # Only relevant if 'page_size_query_param' has also been set.
    max_page_size = None

    # Client can control the page size using this query parameter.
    # Default is 'None'. Set to eg 'page_size' to enable usage.
    page_size_query_param = None

    def get_page_size(self, request):
        if self.page_size_query_param:
            try:
                return _positive_int(
                    request.query_params[self.page_size_query_param],
                    strict=True,
                    cutoff=self.max_page_size
                )
            except (KeyError, ValueError):
                pass

        return self.page_size


class PageNumberPagination(BasePageSizePagination):
 </s> add class PageNumberPagination(BasePagination): </s> remove class CursorPagination(BasePageSizePagination):
 </s> add class CursorPagination(BasePagination):
    def get_page_size(self, request):
        if self.page_size_query_param:
            try:
                return _positive_int(
                    request.query_params[self.page_size_query_param],
                    strict=True,
                    cutoff=self.max_page_size
                )
            except (KeyError, ValueError):
                pass

        return self.page_size

              ('results', data)
          ]))
  
    def get_page_size(self, request):
        if self.page_size_query_param:
            try:
                return _positive_int(
                    request.query_params[self.page_size_query_param],
                    strict=True,
                    cutoff=self.max_page_size
                )
            except (KeyError, ValueError):
                pass

        return self.page_size

      def get_next_link(self):
          if not self.page.has_next():
              return None
          url = self.request.build_absolute_uri()
          page_number = self.page.next_page_number()
keep keep add keep keep keep keep keep
 revert BasePageSizePagination class and CursorPagination inheritance 
rest_framework/pagination.py