              return None
  
          self.count = self.get_count(queryset)
          self.offset = self.get_offset(request)
          self.request = request
          if self.count > self.limit and self.template is not None:
              self.display_page_controls = True
  
          if self.count == 0 or self.offset > self.count:
              return []
 
</s> remove         self.request = request
 </s> add 
              return None
  
          self.count = self.get_count(queryset)
          self.offset = self.get_offset(request)

          if self.count > self.limit and self.template is not None:
              self.display_page_controls = True
  
          if self.count == 0 or self.offset > self.count:
              return []
keep keep keep keep replace keep keep keep keep keep
 Make request consistently available in pagination classes (#8764)

* Store request in CursorPagination field

* Define request at start of pagination entrypoint 
rest_framework/pagination.py