]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937)
authorVictor Stinner <vstinner@redhat.com>
Tue, 11 Jun 2019 10:45:35 +0000 (12:45 +0200)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2019 10:45:35 +0000 (12:45 +0200)
commit2b578479b96aa3deeeb8bac313a02b5cf3cb1aff
tree2ac4c481cc985580dd6a34ca21a5614a886a5741
parent99b5c940d3471e0ed6579771d94e7342d7c733e0
[2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937)

If urlparse.urlsplit() detects an invalid netloc according to NFKC
normalization, the error message type is now str rather than unicode,
and use repr() to format the URL, to prevent <exception str() failed>
when display the error message.
Lib/test/test_urlparse.py
Lib/urlparse.py
Misc/NEWS.d/next/Library/2019-06-10-12-02-45.bpo-36742.UEdHXJ.rst [new file with mode: 0644]