Skip to content

Commit f6e863d

Browse files
howinatororsenthil
authored andcommitted
bpo-29651 - Cover edge case of square brackets in urllib docs (#1128)
1 parent 7d6320b commit f6e863d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/urllib.parse.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ or on combining URL components into a URL string.
121121
an invalid port is specified in the URL. See section
122122
:ref:`urlparse-result-object` for more information on the result object.
123123

124+
Unmatched square brackets in the :attr:`netloc` attribute will raise a
125+
:exc:`ValueError`.
126+
124127
.. versionchanged:: 3.2
125128
Added IPv6 URL parsing capabilities.
126129

@@ -239,6 +242,9 @@ or on combining URL components into a URL string.
239242
an invalid port is specified in the URL. See section
240243
:ref:`urlparse-result-object` for more information on the result object.
241244

245+
Unmatched square brackets in the :attr:`netloc` attribute will raise a
246+
:exc:`ValueError`.
247+
242248
.. versionchanged:: 3.6
243249
Out-of-range port numbers now raise :exc:`ValueError`, instead of
244250
returning :const:`None`.

0 commit comments

Comments
 (0)