New submission from Björn Lindqvist: This affects both Python 2 and 3. This is as expected:
>>> urlparse('abc:123.html') ParseResult(scheme='abc', netloc='', path='123.html', params='', query='', fragment='') >>> urlparse('123.html:abc') ParseResult(scheme='123.html', netloc='', path='abc', params='', query='', fragment='') >>> urlparse('abc:123/') ParseResult(scheme='abc', netloc='', path='123/', params='', query='', fragment='') This is NOT: >>> urlparse('abc:123') ParseResult(scheme='', netloc='', path='abc:123', params='', query='', fragment='') Expected is path='123' and scheme='abc'. At least according to my reading of the rfc (https://tools.ietf.org/html/rfc1808.html) that is what should happen. ---------- components: Library (Lib) messages: 271702 nosy: Björn.Lindqvist priority: normal severity: normal status: open title: urlparse fails if the path is numeric type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27657> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com