summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.request.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-06 21:17:45 (GMT)
committerGitHub <noreply@github.com>2023-06-06 21:17:45 (GMT)
commit2587b9f64eefde803a5e0b050171ad5f6654f31b (patch)
tree5304fb7ff2534429db4b07a907f8c06cab0a19dc /Doc/library/urllib.request.rst
parent94d5f9827da4bf4b1e61c134fe29904b2b92f124 (diff)
downloadcpython-2587b9f64eefde803a5e0b050171ad5f6654f31b.zip
cpython-2587b9f64eefde803a5e0b050171ad5f6654f31b.tar.gz
cpython-2587b9f64eefde803a5e0b050171ad5f6654f31b.tar.bz2
gh-105382: Remove urllib.request cafile parameter (#105384)
Remove cafile, capath and cadefault parameters of the urllib.request.urlopen() function, deprecated in Python 3.6.
Diffstat (limited to 'Doc/library/urllib.request.rst')
-rw-r--r--Doc/library/urllib.request.rst19
1 files changed, 4 insertions, 15 deletions
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 1b05458..7e79871 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -26,7 +26,7 @@ authentication, redirections, cookies and more.
The :mod:`urllib.request` module defines the following functions:
-.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=False, context=None)
+.. function:: urlopen(url, data=None[, timeout], *, context=None)
Open *url*, which can be either a string containing a valid, properly
encoded URL, or a :class:`Request` object.
@@ -47,14 +47,6 @@ The :mod:`urllib.request` module defines the following functions:
describing the various SSL options. See :class:`~http.client.HTTPSConnection`
for more details.
- The optional *cafile* and *capath* parameters specify a set of trusted
- CA certificates for HTTPS requests. *cafile* should point to a single
- file containing a bundle of CA certificates, whereas *capath* should
- point to a directory of hashed certificate files. More information can
- be found in :meth:`ssl.SSLContext.load_verify_locations`.
-
- The *cadefault* parameter is ignored.
-
This function always returns an object which can work as a
:term:`context manager` and has the properties *url*, *headers*, and *status*.
See :class:`urllib.response.addinfourl` for more detail on these properties.
@@ -115,12 +107,9 @@ The :mod:`urllib.request` module defines the following functions:
``http/1.1`` when no *context* is given. Custom *context* should set
ALPN protocols with :meth:`~ssl.SSLContext.set_alpn_protocol`.
- .. deprecated:: 3.6
-
- *cafile*, *capath* and *cadefault* are deprecated in favor of *context*.
- Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
- :func:`ssl.create_default_context` select the system's trusted CA
- certificates for you.
+ .. versionchanged:: 3.13
+ Remove *cafile*, *capath* and *cadefault* parameters: use the *context*
+ parameter instead.
.. function:: install_opener(opener)