Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
aa39c1ab
Commit
aa39c1ab
authored
Nov 01, 2018
by
Lysandros Nikolaou
Committed by
Xiang Zhang
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.7] bpo-32804: Include the context parameter in urlretrieve documentation (GH-10203)
parent
05acd44a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
Doc/library/urllib.rst
Doc/library/urllib.rst
+15
-2
No files found.
Doc/library/urllib.rst
View file @
aa39c1ab
...
...
@@ -147,14 +147,15 @@ High-level interface
:envvar:`no_proxy` environment variable.
.. versionchanged:: 2.7.9
The *context* parameter was added. All the neccessary certificate and hostname checks are done by default.
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
of :func:`urllib2.urlopen`.
.. function:: urlretrieve(url[, filename[, reporthook[, data]]])
.. function:: urlretrieve(url[, filename[, reporthook[, data
[, context]
]]])
Copy a network object denoted by a URL to a local file, if necessary. If the URL
points to a local file, or a valid cached copy of the object exists, the object
...
...
@@ -179,6 +180,10 @@ High-level interface
:mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
function below.
The *context* parameter may be set to a :class:`ssl.SSLContext` instance to
configure the SSL settings that are used if :func:`urlretrieve` makes a HTTPS
connection.
.. versionchanged:: 2.5
:func:`urlretrieve` will raise :exc:`ContentTooShortError` when it detects that
the amount of data available was less than the expected amount (which is the
...
...
@@ -196,6 +201,10 @@ High-level interface
the size of the data it has downloaded, and just returns it. In this case you
just have to assume that the download was successful.
.. versionchanged:: 2.7.9
The *context* parameter was added. All the neccessary certificate and hostname
checks are done by default.
.. data:: _urlopener
...
...
@@ -349,6 +358,10 @@ URL Opener objects
:class:`URLopener` objects will raise an :exc:`IOError` exception if the server
returns an error code.
.. versionchanged:: 2.7.9
The *context* parameter was added. All the neccessary certificate and hostname
checks are done by default.
.. method:: open(fullurl[, data])
Open *fullurl* using the appropriate protocol. This method sets up cache and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment