[issue33846] Misleading error message in urllib.parse.unquote

2018-06-17 Thread R. David Murray
R. David Murray added the comment: I thought there was a more general issue for the 'in' operator itself, but perhaps the issue you found was indeed the one I was thinking of. This one certainly seems to be a duplicate of that one ;) If you've a mind to, you could turn the patch in that is

[issue33846] Misleading error message in urllib.parse.unquote

2018-06-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: @r.david.murray I googled the error message and I hope you are referring to the below issue which has a patch and test. issue : https://bugs.python.org/issue32498 -- nosy: +xtreak ___ Python tracker

[issue33846] Misleading error message in urllib.parse.unquote

2018-06-12 Thread R. David Murray
R. David Murray added the comment: We don't generally do type checks like that. This is a specific case of a general issue with binary operators and mismatched string/bytes types. I thought there was an open issue for it, but I haven't found it yet. -- nosy: +r.david.murray __

[issue33846] Misleading error message in urllib.parse.unquote

2018-06-12 Thread Johannes Raggam
New submission from Johannes Raggam : urllib.parse.unquote gives an misleading error message when: >>> import urllib >>> urllib.parse.unquote(b'bytesurl') *** TypeError: a bytes-like object is required, not 'str' while: >>> urllib.parse.unquote('texturl') texturl The correct behavior is to p