      from pytz.exceptions import InvalidTimeError
  except ImportError:
      InvalidTimeError = Exception
  
  
  # `separators` argument to `json.dumps()` differs between 2.x and 3.x
  # See: http://bugs.python.org/issue22767
  if six.PY3:
      SHORT_SEPARATORS = (',', ':')
      LONG_SEPARATORS = (', ', ': ')
 
</s> remove         return urlpattern.pattern.regex.pattern
 </s> add         return str(urlpattern.pattern) </s> remove         path = path.replace('<', '{').replace('>', '}')
 </s> add         # Strip Django 2.0 convertors as they are incompatible with uritemplate format
        path = re.sub(_PATH_PARAMETER_COMPONENT_RE, r'{\g<parameter>}', path) </s> remove from rest_framework.compat import coreapi, coreschema, get_regex_pattern
 </s> add from rest_framework.compat import coreapi, coreschema, get_regex_pattern, path
# Django 1.x url routing syntax. Remove when dropping Django 1.11 support.
try:
    from django.urls import include, path, re_path # noqa
except ImportError:
    from django.conf.urls import include, url # noqa
    path = None
    re_path = url

      from pytz.exceptions import InvalidTimeError
  except ImportError:
      InvalidTimeError = Exception
  
# Django 1.x url routing syntax. Remove when dropping Django 1.11 support.
try:
    from django.urls import include, path, re_path # noqa
except ImportError:
    from django.conf.urls import include, url # noqa
    path = None
    re_path = url

  
  # `separators` argument to `json.dumps()` differs between 2.x and 3.x
  # See: http://bugs.python.org/issue22767
  if six.PY3:
      SHORT_SEPARATORS = (',', ':')
      LONG_SEPARATORS = (', ', ': ')
keep keep keep add keep keep keep keep keep keep
 Fix URL pattern parsing in schema generation (#5689)

* Fix url parsing in schema generation

- Call `str(pattern)` to get non-escaped route
- Strip converters from path to comply with uritemplate format. 
   Background: https://github.com/encode/django-rest-framework/issues/5675#issuecomment-352829363

Fixes #5675 
rest_framework/compat.py