diff --git a/rhodecode/apps/login/views.py b/rhodecode/apps/login/views.py --- a/rhodecode/apps/login/views.py +++ b/rhodecode/apps/login/views.py @@ -90,7 +90,7 @@ def store_user_in_session(session, usern def get_came_from(request): came_from = safe_str(request.GET.get('came_from', '')) - parsed = urllib.parse.urlparse.urlparse(came_from) + parsed = urllib.parse.urlparse(came_from) allowed_schemes = ['http', 'https'] default_came_from = h.route_path('home') if parsed.scheme and parsed.scheme not in allowed_schemes: diff --git a/rhodecode/apps/ssh_support/lib/backends/svn.py b/rhodecode/apps/ssh_support/lib/backends/svn.py --- a/rhodecode/apps/ssh_support/lib/backends/svn.py +++ b/rhodecode/apps/ssh_support/lib/backends/svn.py @@ -202,7 +202,7 @@ class SubversionTunnelWrapper(object): if not first_response: return self.fail("Repository name cannot be extracted") - url_parts = urllib.parse.urlparse.urlparse(first_response['url']) + url_parts = urllib.parse.urlparse(first_response['url']) self.server.repo_name = self._match_repo_name(url_parts.path.strip('/')) diff --git a/rhodecode/lib/markup_renderer.py b/rhodecode/lib/markup_renderer.py --- a/rhodecode/lib/markup_renderer.py +++ b/rhodecode/lib/markup_renderer.py @@ -142,7 +142,7 @@ def relative_path(path, request_path, is # skip data, anchor, invalid links return path - is_absolute = bool(urllib.parse.urlparse.urlparse(path).netloc) + is_absolute = bool(urllib.parse.urlparse(path).netloc) if is_absolute: return path diff --git a/rhodecode/lib/middleware/simplesvn.py b/rhodecode/lib/middleware/simplesvn.py --- a/rhodecode/lib/middleware/simplesvn.py +++ b/rhodecode/lib/middleware/simplesvn.py @@ -123,7 +123,7 @@ class SimpleSvnApp(object): def _get_url(self, svn_http_server, path): svn_http_server_url = (svn_http_server or '').rstrip('/') - url_path = urllib.parse.urlparse.urljoin(svn_http_server_url + '/', (path or '').lstrip('/')) + url_path = urllib.parse.urljoin(svn_http_server_url + '/', (path or '').lstrip('/')) url_path = urllib.parse.quote(url_path, safe="/:=~+!$,;'") return url_path diff --git a/rhodecode/lib/middleware/utils/scm_app_http.py b/rhodecode/lib/middleware/utils/scm_app_http.py --- a/rhodecode/lib/middleware/utils/scm_app_http.py +++ b/rhodecode/lib/middleware/utils/scm_app_http.py @@ -111,7 +111,7 @@ class VcsHttpProxy(object): # Preserve the query string url = self._url - url = urllib.parse.urlparse.urljoin(url, self._repo_name) + url = urllib.parse.urljoin(url, self._repo_name) if environ.get('QUERY_STRING'): url += '?' + environ['QUERY_STRING'] diff --git a/rhodecode/lib/vcs/client_http.py b/rhodecode/lib/vcs/client_http.py --- a/rhodecode/lib/vcs/client_http.py +++ b/rhodecode/lib/vcs/client_http.py @@ -132,7 +132,7 @@ def _streaming_remote_call(url, payload, class ServiceConnection(object): def __init__(self, server_and_port, backend_endpoint, session_factory): - self.url = urllib.parse.urlparse.urljoin('http://%s' % server_and_port, backend_endpoint) + self.url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint) self._session_factory = session_factory def __getattr__(self, name): @@ -154,8 +154,8 @@ class ServiceConnection(object): class RemoteVCSMaker(object): def __init__(self, server_and_port, backend_endpoint, backend_type, session_factory): - self.url = urllib.parse.urlparse.urljoin('http://%s' % server_and_port, backend_endpoint) - self.stream_url = urllib.parse.urlparse.urljoin('http://%s' % server_and_port, backend_endpoint+'/stream') + self.url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint) + self.stream_url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint+'/stream') self._session_factory = session_factory self.backend_type = backend_type @@ -356,7 +356,7 @@ class VcsHttpProxy(object): retries = Retry(total=5, connect=None, read=None, redirect=None) adapter = requests.adapters.HTTPAdapter(max_retries=retries) - self.base_url = urllib.parse.urlparse.urljoin('http://%s' % server_and_port, backend_endpoint) + self.base_url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint) self.session = requests.Session() self.session.mount('http://', adapter) diff --git a/rhodecode/tests/lib/middleware/test_simplegit.py b/rhodecode/tests/lib/middleware/test_simplegit.py --- a/rhodecode/tests/lib/middleware/test_simplegit.py +++ b/rhodecode/tests/lib/middleware/test_simplegit.py @@ -30,7 +30,7 @@ import rhodecode.lib.middleware.simplegi def get_environ(url, request_method): """Construct a minimum WSGI environ based on the URL.""" - parsed_url = urllib.parse.urlparse.urlparse(url) + parsed_url = urllib.parse.urlparse(url) environ = { 'PATH_INFO': parsed_url.path, 'QUERY_STRING': parsed_url.query, diff --git a/rhodecode/tests/lib/middleware/test_simplehg.py b/rhodecode/tests/lib/middleware/test_simplehg.py --- a/rhodecode/tests/lib/middleware/test_simplehg.py +++ b/rhodecode/tests/lib/middleware/test_simplehg.py @@ -31,7 +31,7 @@ import rhodecode.lib.middleware.simplehg def get_environ(url): """Construct a minimum WSGI environ based on the URL.""" - parsed_url = urllib.parse.urlparse.urlparse(url) + parsed_url = urllib.parse.urlparse(url) environ = { 'PATH_INFO': parsed_url.path, 'QUERY_STRING': parsed_url.query, diff --git a/rhodecode/tests/utils.py b/rhodecode/tests/utils.py --- a/rhodecode/tests/utils.py +++ b/rhodecode/tests/utils.py @@ -27,7 +27,6 @@ import tempfile import urllib.request, urllib.error, urllib.parse from lxml.html import fromstring, tostring from lxml.cssselect import CSSSelector -import urllib.parse.urlparse from urllib.parse import unquote_plus import webob