From f1719c7c3faeb4ae99a198f9564641945e93d91c Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Sat, 20 Oct 2018 01:14:44 +0100 Subject: [PATCH] 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 Closes: #6261 --- rest_framework/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 1d34828bd..ea09ce9bc 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -22,7 +22,7 @@ try: 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