@@ -147,14 +147,15 @@ High-level interface
147
147
:envvar: `no_proxy ` environment variable.
148
148
149
149
.. versionchanged :: 2.7.9
150
- The *context * parameter was added. All the neccessary certificate and hostname checks are done by default.
150
+ The *context * parameter was added. All the neccessary certificate and hostname
151
+ checks are done by default.
151
152
152
153
.. deprecated :: 2.6
153
154
The :func: `urlopen ` function has been removed in Python 3 in favor
154
155
of :func: `urllib2.urlopen `.
155
156
156
157
157
- .. function :: urlretrieve(url[, filename[, reporthook[, data]]])
158
+ .. function :: urlretrieve(url[, filename[, reporthook[, data[, context] ]]])
158
159
159
160
Copy a network object denoted by a URL to a local file, if necessary. If the URL
160
161
points to a local file, or a valid cached copy of the object exists, the object
@@ -179,6 +180,10 @@ High-level interface
179
180
:mimetype: `application/x-www-form-urlencoded ` format; see the :func: `urlencode `
180
181
function below.
181
182
183
+ The *context * parameter may be set to a :class: `ssl.SSLContext ` instance to
184
+ configure the SSL settings that are used if :func: `urlretrieve ` makes a HTTPS
185
+ connection.
186
+
182
187
.. versionchanged :: 2.5
183
188
:func: `urlretrieve ` will raise :exc: `ContentTooShortError ` when it detects that
184
189
the amount of data available was less than the expected amount (which is the
@@ -196,6 +201,10 @@ High-level interface
196
201
the size of the data it has downloaded, and just returns it. In this case you
197
202
just have to assume that the download was successful.
198
203
204
+ .. versionchanged :: 2.7.9
205
+ The *context * parameter was added. All the neccessary certificate and hostname
206
+ checks are done by default.
207
+
199
208
200
209
.. data :: _urlopener
201
210
@@ -349,6 +358,10 @@ URL Opener objects
349
358
:class: `URLopener ` objects will raise an :exc: `IOError ` exception if the server
350
359
returns an error code.
351
360
361
+ .. versionchanged :: 2.7.9
362
+ The *context * parameter was added. All the neccessary certificate and hostname
363
+ checks are done by default.
364
+
352
365
.. method :: open(fullurl[, data])
353
366
354
367
Open *fullurl * using the appropriate protocol. This method sets up cache and
0 commit comments