summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.parse.rst
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hp.com>2015-08-09 21:53:30 (GMT)
committerRobert Collins <rbtcollins@hp.com>2015-08-09 21:53:30 (GMT)
commitdfa95c9a8f2772d1e8e54aa5aa14c91d4971964f (patch)
treec86f63dde8e78423f0384abeb55ec02cfd3e64c1 /Doc/library/urllib.parse.rst
parent846a1487cb2dea74dcb858b35fa406ac38641fe6 (diff)
downloadcpython-dfa95c9a8f2772d1e8e54aa5aa14c91d4971964f.zip
cpython-dfa95c9a8f2772d1e8e54aa5aa14c91d4971964f.tar.gz
cpython-dfa95c9a8f2772d1e8e54aa5aa14c91d4971964f.tar.bz2
Issue #20059: urllib.parse raises ValueError on all invalid ports.
Patch by Martin Panter.
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r--Doc/library/urllib.parse.rst18
1 files changed, 14 insertions, 4 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 40098d0..7c075ad 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -115,8 +115,9 @@ or on combining URL components into a URL string.
| | | if present | |
+------------------+-------+--------------------------+----------------------+
- See section :ref:`urlparse-result-object` for more information on the result
- object.
+ Reading the :attr:`port` attribute will raise a :exc:`ValueError` if
+ an invalid port is specified in the URL. See section
+ :ref:`urlparse-result-object` for more information on the result object.
.. versionchanged:: 3.2
Added IPv6 URL parsing capabilities.
@@ -126,6 +127,10 @@ or on combining URL components into a URL string.
false), in accordance with :rfc:`3986`. Previously, a whitelist of
schemes that support fragments existed.
+ .. versionchanged:: 3.6
+ Out-of-range port numbers now raise :exc:`ValueError`, instead of
+ returning :const:`None`.
+
.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace')
@@ -228,8 +233,13 @@ or on combining URL components into a URL string.
| | | if present | |
+------------------+-------+-------------------------+----------------------+
- See section :ref:`urlparse-result-object` for more information on the result
- object.
+ Reading the :attr:`port` attribute will raise a :exc:`ValueError` if
+ an invalid port is specified in the URL. See section
+ :ref:`urlparse-result-object` for more information on the result object.
+
+ .. versionchanged:: 3.6
+ Out-of-range port numbers now raise :exc:`ValueError`, instead of
+ returning :const:`None`.
.. function:: urlunsplit(parts)