[issue22234] urllib.parse.urlparse accepts any falsy value as an url

Martin Panter report at bugs.python.org
Tue Apr 26 02:39:02 EDT 2016


Martin Panter added the comment:

Luiz: Your _36 patch looks like it adds an unconditional warning whenever urlparse() is called, but I would have expected it to depend on the type of the “url” parameter.

There are related functions that seem to accept false values like None in Python 3, but not in Python 2. Perhaps they should also be considered with any changes:

urlsplit(None)
parse_qs(None)
parse_qsl(None)
urldefrag(None)

Also, I wonder if we should continue to accept bytearray as well as bytes. Bytearray has a decode() method.

----------
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22234>
_______________________________________


More information about the Python-bugs-list mailing list