Message344981
The fix for python-2.7 (https://github.com/python/cpython/pull/13815/files#diff-b577545d73dd0cdb2c337a4c5f89e1d7R183) causes errors when netloc contains characters that can't be encoded by 'ascii' codec.
You can see it by doing:
>>> netloc = u'example.com\uFF03@bing.com'
>>> raise ValueError(u"netloc '" + netloc + u"' contains invalid characters under NFKC normalization")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: <exception str() failed>
>>> str(netloc)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\uff03' in position 11: ordinal not in range(128)
I suggest we use `repr(netloc)` instead of `netloc` in the ValueError message. |
|
Date |
User |
Action |
Args |
2019-06-07 17:59:17 | rschiron | set | recipients:
+ rschiron, orsenthil, vstinner, larry, benjamin.peterson, ned.deily, ezio.melotti, lukasz.langa, steve.dower, miss-islington, xtreak, hokousya |
2019-06-07 17:59:17 | rschiron | set | messageid: <1559930357.74.0.640852548427.issue36742@roundup.psfhosted.org> |
2019-06-07 17:59:17 | rschiron | link | issue36742 messages |
2019-06-07 17:59:17 | rschiron | create | |
|