diff options
| author | Senthil Kumaran <senthil@uthcode.com> | 2014-09-19 15:23:30 +0800 |
|---|---|---|
| committer | Senthil Kumaran <senthil@uthcode.com> | 2014-09-19 15:23:30 +0800 |
| commit | 8b7e161ac39b14abe0a06b69ae4e51d16649f628 (patch) | |
| tree | f11f094eeb81e8fe236fec14ac2155b54978265e /Doc/library | |
| parent | cc23154d020723dc85d055324861f6a8f54fe0f7 (diff) | |
| download | cpython-git-8b7e161ac39b14abe0a06b69ae4e51d16649f628.tar.gz | |
backport context argument of urlopen (#22366) for pep 476
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/urllib.request.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 019f59cfbc..23ac29b3c1 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. |
