[New-bugs-announce] [issue34360] urllib.parse doesn't fail with multiple unmatching square brackets

Florian Bruhin report at bugs.python.org
Wed Aug 8 12:02:35 EDT 2018


New submission from Florian Bruhin <python.org at the-compiler.org>:

Since bpo-29651, the urllib.parse docs say:

> Unmatched square brackets in the netloc attribute will raise a ValueError.

However, when there are at least one [ and ], but they don't match, there's somewhat inconsistent behavior:

>>> urllib.parse.urlparse('http://[::1]]').hostname
'::1'
>>> urllib.parse.urlparse('http://[[::1]').hostname
'[::1'

----------
components: Library (Lib)
messages: 323292
nosy: Howie Benefiel, The Compiler, orsenthil
priority: normal
severity: normal
status: open
title: urllib.parse doesn't fail with multiple unmatching square brackets
type: behavior

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


More information about the New-bugs-announce mailing list