aboutsummaryrefslogtreecommitdiff
path: root/requests/packages/urllib3/util/url.py
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2015-12-22 13:47:07 +0000
committerChristopher Baines <mail@cbaines.net>2015-12-22 13:48:06 +0000
commit79f51e45f74dd32f9c1a103150ded9d575f5f94c (patch)
treeadcea8da78181c97b46d4483657877b2b348833a /requests/packages/urllib3/util/url.py
parent59759b30c8a8f23377afe562a44ddc893dbbb833 (diff)
parent08c16e06ad11c6fcb26f4ca1ea3f11093598092f (diff)
downloadpython-requests-79f51e45f74dd32f9c1a103150ded9d575f5f94c.tar
python-requests-79f51e45f74dd32f9c1a103150ded9d575f5f94c.tar.gz
change version to 2.9.1-1 (UNRELEASED)
New upstream release 2.9.1
Diffstat (limited to 'requests/packages/urllib3/util/url.py')
-rw-r--r--requests/packages/urllib3/util/url.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/requests/packages/urllib3/util/url.py b/requests/packages/urllib3/util/url.py
index e58050c..e996204 100644
--- a/requests/packages/urllib3/util/url.py
+++ b/requests/packages/urllib3/util/url.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
from collections import namedtuple
from ..exceptions import LocationParseError
@@ -85,6 +86,7 @@ class Url(namedtuple('Url', url_attrs)):
def __str__(self):
return self.url
+
def split_first(s, delims):
"""
Given a string and an iterable of delimiters, split on the first found
@@ -115,7 +117,7 @@ def split_first(s, delims):
if min_idx is None or min_idx < 0:
return s, '', None
- return s[:min_idx], s[min_idx+1:], min_delim
+ return s[:min_idx], s[min_idx + 1:], min_delim
def parse_url(url):
@@ -206,6 +208,7 @@ def parse_url(url):
return Url(scheme, auth, host, port, path, query, fragment)
+
def get_host(url):
"""
Deprecated. Use :func:`.parse_url` instead.