  
  class NonAtomicAPIExceptionView(APIView):
      @transaction.non_atomic_requests
      def dispatch(self, *args, **kwargs):
          return super(NonAtomicAPIExceptionView, self).dispatch(*args, **kwargs)
  
      def get(self, request, *args, **kwargs):
          BasicModel.objects.all()
          raise Http404
  
 
</s> remove             return super(RequestsClient, self).request(method, url, *args, **kwargs)
 </s> add             return super().request(method, url, *args, **kwargs) </s> remove             super(RequestsClient, self).__init__(*args, **kwargs)
 </s> add             super().__init__(*args, **kwargs) </s> remove         super(ReturnList, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs) </s> remove             return super(CoreAPIClient, self).__init__(*args, **kwargs)
 </s> add             return super().__init__(*args, **kwargs) </s> remove         super(ReturnDict, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs)
        return super().dispatch(*args, **kwargs)
  
  class NonAtomicAPIExceptionView(APIView):
      @transaction.non_atomic_requests
      def dispatch(self, *args, **kwargs):
        return super().dispatch(*args, **kwargs)
  
      def get(self, request, *args, **kwargs):
          BasicModel.objects.all()
          raise Http404
  
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_atomic_requests.py