-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[2.7] bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) #13025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lib/test/test_urlparse.py
Outdated
@@ -641,6 +641,12 @@ def test_urlsplit_normalization(self): | |||
self.assertIn(u'\u2100', denorm_chars) | |||
self.assertIn(u'\uFF03', denorm_chars) | |||
|
|||
# bpo-36742: Verify port separators are ignored when they | |||
# existed prior to decomposition | |||
urllib.parse.urlsplit('http://\u30d5\u309a:80') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the Python 3 patch applied here. urlunparse.urlsplit
could be the correct function for this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you're right. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're welcome. There is some test error on CI :
test test_urlparse failed -- Traceback (most recent call last):
File "/home/travis/build/python/cpython/Lib/test/test_urlparse.py", line 648, in test_urlsplit_normalization
urlparse.urlsplit('http://\u30d5\u309a\ufe1380')
AssertionError: ValueError not raised
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I guess u"" prefix is missing since it's Python 2 ? Adding it makes the tests to pass locally for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
https://bugs.python.org/issue36742