diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 1d34828bdc..ea09ce9bcf 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -22,7 +22,7 @@ import urllib.parse as urlparse # noqa except ImportError: # Python 2.7 - from urlparse import urlparse # noqa + import urlparse # noqa try: from django.urls import ( # noqa