summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Michael Larson <sethmichaellarson@gmail.com>2019-04-28 10:11:00 -0500
committerSeth Michael Larson <sethmichaellarson@gmail.com>2019-04-28 10:11:00 -0500
commit488748e127d3d3fde6e7ec9344f445aabcca2c6b (patch)
tree49e5aff1209bd83dd5b2d9a0713df7174fd2d2bb
parenteb163356be53755f6d4fb178969c0942f3e47baa (diff)
downloadurllib3-target-passthrough.tar.gz
Remove dead codetarget-passthrough
-rw-r--r--src/urllib3/util/url.py8
-rw-r--r--test/test_util.py6
2 files changed, 4 insertions, 10 deletions
diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py
index b171248c..0bc6ced7 100644
--- a/src/urllib3/util/url.py
+++ b/src/urllib3/util/url.py
@@ -233,14 +233,6 @@ def parse_url(url):
if has_authority and uri_ref.authority is None:
raise LocationParseError(url)
- # Percent-encode any characters that aren't allowed in that component
- # before normalizing and validating.
- #uri_ref = uri_ref.copy_with(
- # path=_encode_invalid_chars(uri_ref.path, PATH_CHARS),
- # query=_encode_invalid_chars(uri_ref.query, QUERY_CHARS),
- # fragment=_encode_invalid_chars(uri_ref.fragment, FRAGMENT_CHARS)
- #)
-
# Only normalize schemes we understand to not break http+unix
# or other schemes that don't follow RFC 3986.
if uri_ref.scheme is None or uri_ref.scheme.lower() in NORMALIZABLE_SCHEMES:
diff --git a/test/test_util.py b/test/test_util.py
index 3588bace..cc237b0e 100644
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -234,8 +234,10 @@ class TestUtil(object):
# Unicode Surrogates
(u'http://google.com/\uD800', Url('http', host='google.com', path='%ED%A0%80')),
- (u'http://google.com?q=\uDC00', Url('http', host='google.com', path='', query='q=%ED%B0%80')),
- (u'http://google.com#\uDC00', Url('http', host='google.com', path='', fragment='%ED%B0%80')),
+ (u'http://google.com?q=\uDC00',
+ Url('http', host='google.com', path='', query='q=%ED%B0%80')),
+ (u'http://google.com#\uDC00',
+ Url('http', host='google.com', path='', fragment='%ED%B0%80')),
]
@pytest.mark.parametrize(