Title: port not split in function urllib.parse.urlsplit
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: JTMoon79, r.david.murray
Priority: normal Keywords:

Created on 2010-12-13 20:05 by JTMoon79, last changed 2010-12-13 20:21 by r.david.murray. This issue is now closed.

Messages (3)
msg123897 - (view) Author: JamesThomasMoon1979 (JTMoon79) Date: 2010-12-13 20:05
urlsplit function from urllib.parse.urlsplit does not return the port field.
Repro steps

>>> import urllib
>>> import urllib.parse
>>> urllib.parse.urlsplit(r'')
SplitResult(scheme='http', netloc='', path='/blarg', query='a=1&b=2', fragment='')
SplitResult(scheme='http', netloc='', path='/blarg', port='80', query='a=1&b=2', fragment='')
msg123899 - (view) Author: JamesThomasMoon1979 (JTMoon79) Date: 2010-12-13 20:18
see comments at
msg123900 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-13 20:21
Take another look at the documentation.

>>> import urllib.parse
>>> o = urllib.parse.urlsplit("")
>>> o
SplitResult(scheme='http', netloc='', path='/blarg', query='a=1&b=2', fragment='')
>>> o.port
Date User Action Args
2010-12-13 20:21:33r.david.murraysetstatus: open -> closed
2010-12-13 20:21:23r.david.murraysetnosy: + r.david.murray
messages: + msg123900

resolution: not a bug
stage: resolved
2010-12-13 20:18:46JTMoon79setmessages: + msg123899
2010-12-13 20:05:46JTMoon79create