Skip to content

Commit 75b8a54

Browse files
authored
bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1596)
(cherry picked from commit f6e863d)
1 parent aad1caf commit 75b8a54

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
@@ -118,6 +118,9 @@ or on combining URL components into a URL string.
118118
an invalid port is specified in the URL. See section
119119
:ref:`urlparse-result-object` for more information on the result object.
120120

121+
Unmatched square brackets in the :attr:`netloc` attribute will raise a
122+
:exc:`ValueError`.
123+
121124
.. versionchanged:: 3.2
122125
Added IPv6 URL parsing capabilities.
123126

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

242+
Unmatched square brackets in the :attr:`netloc` attribute will raise a
243+
:exc:`ValueError`.
244+
239245
.. versionchanged:: 3.6
240246
Out-of-range port numbers now raise :exc:`ValueError`, instead of
241247
returning :const:`None`.

0 commit comments

Comments
 (0)