[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

Jonathan report at bugs.python.org
Fri Mar 9 04:15:35 EST 2018


Jonathan <bugreports at lightpear.com> added the comment:

Arguably the same logic applies to out-of-range ports:

> a = urlsplit('http://example.com:4444444')
> a.port
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "E:\Software\_libs\Python36\lib\urllib\parse.py", line 169, in port
    raise ValueError("Port out of range 0-65535")
ValueError: Port out of range 0-65535

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33034>
_______________________________________


More information about the Python-bugs-list mailing list