cpython (2.7): Add clarity to the warning on certificate verification in urllib.
https://hg.python.org/cpython/rev/b5125e971fdd changeset: 106325:b5125e971fdd branch: 2.7 parent: 106315:743ff7902879 user: Senthil Kumaran <senthil@uthcode.com> date: Fri Jan 27 23:05:34 2017 -0800 summary: Add clarity to the warning on certificate verification in urllib. files: Doc/library/urllib.rst | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst --- a/Doc/library/urllib.rst +++ b/Doc/library/urllib.rst @@ -26,11 +26,16 @@ .. seealso:: - The `Requests package <http://requests.readthedocs.org/>`_ + The `Requests package <http://docs.python-requests.org/>`_ is recommended for a higher-level HTTP client interface. -.. warning:: When opening HTTPS URLs, it does not attempt to validate the - server certificate. Use at your own risk! +.. versionchanged:: 2.7.9 + + For HTTPS URIs, :mod:`urllib` performs all the neccessary certificate and hostname checks by default. + +.. warning:: + + For Python versions earlier than 2.7.9, urllib does not attempt to validate the server certificates of HTTPS URIs. Use at your own risk! High-level interface @@ -142,7 +147,7 @@ :envvar:`no_proxy` environment variable. .. versionchanged:: 2.7.9 - The *context* parameter was added. + The *context* parameter was added. All the neccessary certificate and hostname checks are done by default. .. deprecated:: 2.6 The :func:`urlopen` function has been removed in Python 3 in favor -- Repository URL: https://hg.python.org/cpython
participants (1)
-
senthil.kumaran