              exc = ObjectValueError(str(sys.exc_info()[1]))
              six.reraise(type(exc), exc, sys.exc_info()[2])
          except TypeError:
              exc = ObjectTypeError(str(sys.exc_info()[1]))
              six.reraise(type(exc), exc, sys.exc_info()[2])
  
      def get_url(self, obj, view_name, request, format):
          """
          Given an object, return the URL that hyperlinks to the object.
  
 
</s> remove             six.reraise(type(exc), exc, sys.exc_info()[2])
 </s> add             raise exc.with_traceback(sys.exc_info()[2]) </s> remove         six.reraise(type(exc), exc, info[2])
 </s> add         raise exc.with_traceback(info[2]) </s> remove class Empty(object):
 </s> add class Empty: </s> remove     (scheme, netloc, path, query, fragment) = urlparse.urlsplit(force_str(url))
    query_dict = urlparse.parse_qs(query, keep_blank_values=True)
 </s> add     (scheme, netloc, path, query, fragment) = parse.urlsplit(force_str(url))
    query_dict = parse.parse_qs(query, keep_blank_values=True) </s> remove     (scheme, netloc, path, query, fragment) = urlparse.urlsplit(force_str(url))
    query_dict = urlparse.parse_qs(query, keep_blank_values=True)
 </s> add     (scheme, netloc, path, query, fragment) = parse.urlsplit(force_str(url))
    query_dict = parse.parse_qs(query, keep_blank_values=True)
            raise exc.with_traceback(sys.exc_info()[2])
              exc = ObjectValueError(str(sys.exc_info()[1]))
              six.reraise(type(exc), exc, sys.exc_info()[2])
          except TypeError:
              exc = ObjectTypeError(str(sys.exc_info()[1]))
            raise exc.with_traceback(sys.exc_info()[2])
  
      def get_url(self, obj, view_name, request, format):
          """
          Given an object, return the URL that hyperlinks to the object.
  
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> 
rest_framework/relations.py