          if base_url and path.startswith('/'):
              path = path[1:]
  
          return coreapi.Link(
              url=urlparse.urljoin(base_url, path),
              action=method.lower(),
              encoding=self._encoding,
              fields=self._fields,
              description=self._description
          )
 
</s> remove             url=urlparse.urljoin(base_url, path),
 </s> add             url=parse.urljoin(base_url, path), </s> remove                 path = urlparse.urlparse(link.url).path
 </s> add                 path = parse.urlparse(link.url).path </s> remove             path = urlparse.urlparse(link.url).path
 </s> add             path = parse.urlparse(link.url).path </s> remove         if isinstance(ret, six.text_type):
 </s> add         if isinstance(ret, str): </s> remove             data = urlparse.urlparse(data).path
 </s> add             data = parse.urlparse(data).path
            url=parse.urljoin(base_url, path),
          if base_url and path.startswith('/'):
              path = path[1:]
  
          return coreapi.Link(
            url=parse.urljoin(base_url, path),
              action=method.lower(),
              encoding=self._encoding,
              fields=self._fields,
              description=self._description
          )
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/schemas/inspectors.py