[New-bugs-announce] [issue16932] urlparse fails at parsing "www.python.org:80/"

Sandro Tosi report at bugs.python.org
Fri Jan 11 12:29:29 CET 2013

New submission from Sandro Tosi:

as reported at http://mail.python.org/pipermail/docs/2013-January/012375.html urlparse fails to parse URLs without a schema and with a url path, as opposed to what's documented at http://docs.python.org/2/library/urlparse.html?highlight=urlparse#urlparse :

./python -c "from urlparse import urlparse ; print(urlparse('python.org:80/'))"
ParseResult(scheme='python.org', netloc='', path='80/', params='', query='', fragment='')

(that is for 2.7, but the same happens on all the 3.x active branches).

i'm attaching a test to expose this failure.

components: Library (Lib)
files: urlparse.diff
keywords: patch
messages: 179670
nosy: sandro.tosi
priority: normal
severity: normal
stage: needs patch
status: open
title: urlparse fails at parsing "www.python.org:80/"
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28692/urlparse.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list