summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.request.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2014-09-19 07:23:30 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2014-09-19 07:23:30 (GMT)
commit8b7e161ac39b14abe0a06b69ae4e51d16649f628 (patch)
treef11f094eeb81e8fe236fec14ac2155b54978265e /Doc/library/urllib.request.rst
parentcc23154d020723dc85d055324861f6a8f54fe0f7 (diff)
downloadcpython-8b7e161ac39b14abe0a06b69ae4e51d16649f628.zip
cpython-8b7e161ac39b14abe0a06b69ae4e51d16649f628.tar.gz
cpython-8b7e161ac39b14abe0a06b69ae4e51d16649f628.tar.bz2
backport context argument of urlopen (#22366) for pep 476
Diffstat (limited to 'Doc/library/urllib.request.rst')
-rw-r--r--Doc/library/urllib.request.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 019f59c..23ac29b 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -16,7 +16,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)
+.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=False, context=None)
Open the URL *url*, which can be either a string or a
:class:`Request` object.
@@ -47,6 +47,10 @@ The :mod:`urllib.request` module defines the following functions:
the global default timeout setting will be used). This actually
only works for HTTP, HTTPS and FTP connections.
+ If *context* is specified, it must be a :class:`ssl.SSLContext` instance
+ 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
@@ -111,6 +115,9 @@ The :mod:`urllib.request` module defines the following functions:
.. versionchanged:: 3.3
*cadefault* was added.
+ .. versionchanged:: 3.4.3
+ *context* was added.
+
.. function:: install_opener(opener)
Install an :class:`OpenerDirector` instance as the default global opener.