Skip to content

Commit b33a6cb

Browse files
committed
Ensure urlparse is not publically exposed in compat.py - less chance of accidental conflict.
1 parent 3dbcefb commit b33a6cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_framework/compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from django.core.exceptions import ImproperlyConfigured
1212
from django.utils.encoding import force_text
13-
from django.utils.six.moves.urllib import parse as urlparse
13+
from django.utils.six.moves.urllib.parse import urlparse as _urlparse
1414
from django.conf import settings
1515
from django.utils import six
1616
import django
@@ -182,7 +182,7 @@ def __init__(self, *args, **kwargs):
182182
class RequestFactory(DjangoRequestFactory):
183183
def generic(self, method, path,
184184
data='', content_type='application/octet-stream', **extra):
185-
parsed = urlparse.urlparse(path)
185+
parsed = _urlparse(path)
186186
data = force_bytes_or_smart_bytes(data, settings.DEFAULT_CHARSET)
187187
r = {
188188
'PATH_INFO': self._get_path(parsed),

0 commit comments

Comments
 (0)