  from django.utils import six
  from django.utils.html import mark_safe
  
  from rest_framework import VERSION, exceptions, serializers, status
  from rest_framework.compat import (
      INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS, coreapi, coreschema,
 
</s> remove     pygments_css, urlparse, yaml
 </s> add     pygments_css, yaml </s> remove try:
    # Python 3
    import urllib.parse as urlparse   # noqa
except ImportError:
    # Python 2.7
    from urlparse import urlparse   # noqa

 </s> add 
from django.utils.six.moves.urllib import parse as urlparse
  from django.utils import six
  from django.utils.html import mark_safe
from django.utils.six.moves.urllib import parse as urlparse
  
  from rest_framework import VERSION, exceptions, serializers, status
  from rest_framework.compat import (
      INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS, coreapi, coreschema,
keep add keep keep keep keep
 compat: (py2) urlparse = urllib.parse (py3) (#6262)

* compat: (py2) urlparse = urllib.parse (py3)

We were mistakenly importing the 'urlparse' function from the Python 2
'urlparse' module, as opposed to the module itself. Correct this.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #6261

* compat: Remove 'compat.urlparse'

We can just use Django's vendored six library, like we do everywhere
else.

Signed-off-by: Stephen Finucane <stephen@that.guru> 
rest_framework/renderers.py