From 957bbd4aeed5a07f79abd40f997f4136b2cc306e Mon Sep 17 00:00:00 2001 From: Howie Benefiel Date: Mon, 15 May 2017 23:48:16 -0500 Subject: [PATCH] bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (cherry picked from commit f6e863d868a621594df2a8abe072b5d4766e7137) --- Doc/library/urllib.parse.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index 676321b46a2232..1cc69e62e63318 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -118,6 +118,9 @@ or on combining URL components into a URL string. an invalid port is specified in the URL. See section :ref:`urlparse-result-object` for more information on the result object. + Unmatched square brackets in the :attr:`netloc` attribute will raise a + :exc:`ValueError`. + .. versionchanged:: 3.2 Added IPv6 URL parsing capabilities. @@ -236,6 +239,9 @@ or on combining URL components into a URL string. an invalid port is specified in the URL. See section :ref:`urlparse-result-object` for more information on the result object. + Unmatched square brackets in the :attr:`netloc` attribute will raise a + :exc:`ValueError`. + .. versionchanged:: 3.6 Out-of-range port numbers now raise :exc:`ValueError`, instead of returning :const:`None`.