summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.request.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-03-14 20:43:53 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-03-14 20:43:53 (GMT)
commit38b968b9131820d089e4dc68b11675c3bc98a631 (patch)
tree0595d65dfc835b6599bbb5ad9e116c4c03a53a48 /Doc/library/urllib.request.rst
parentc17adf41511f7165935074bc505e09e0574f59be (diff)
downloadcpython-38b968b9131820d089e4dc68b11675c3bc98a631.zip
cpython-38b968b9131820d089e4dc68b11675c3bc98a631.tar.gz
cpython-38b968b9131820d089e4dc68b11675c3bc98a631.tar.bz2
deprecated the old urllib primitives in 3.3 urllib package - issue 10050
Diffstat (limited to 'Doc/library/urllib.request.rst')
-rw-r--r--Doc/library/urllib.request.rst78
1 files changed, 51 insertions, 27 deletions
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index c1bf490..ef5d2da 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -385,12 +385,6 @@ request.
.. versionadded:: 3.3
-.. method:: Request.add_data(data)
-
- Set the :class:`Request` data to *data*. This is ignored by all handlers except
- HTTP handlers --- and there it should be a byte string, and will change the
- request to be ``POST`` rather than ``GET``.
-
.. method:: Request.get_method()
@@ -403,16 +397,6 @@ request.
get_method now looks at the value of :attr:`Request.method`.
-.. method:: Request.has_data()
-
- Return whether the instance has a non-\ ``None`` data.
-
-
-.. method:: Request.get_data()
-
- Return the instance's data.
-
-
.. method:: Request.add_header(key, val)
Add another header to the request. Headers are currently ignored by all
@@ -440,38 +424,78 @@ request.
Return the URL given in the constructor.
+.. method:: Request.set_proxy(host, type)
+
+ Prepare the request by connecting to a proxy server. The *host* and *type* will
+ replace those of the instance, and the instance's selector will be the original
+ URL given in the constructor.
+
+
+.. method:: Request.add_data(data)
+
+ Set the :class:`Request` data to *data*. This is ignored by all handlers except
+ HTTP handlers --- and there it should be a byte string, and will change the
+ request to be ``POST`` rather than ``GET``. Deprecated in 3.3, use
+ :attr:`Request.data`.
+
+ .. deprecated:: 3.3
+
+
+.. method:: Request.has_data()
+
+ Return whether the instance has a non-\ ``None`` data. Deprecated in 3.3,
+ use :attr:`Request.data`.
+
+ .. deprecated:: 3.3
+
+
+.. method:: Request.get_data()
+
+ Return the instance's data. Deprecated in 3.3, use :attr:`Request.data`.
+
+ .. deprecated:: 3.3
+
+
.. method:: Request.get_type()
- Return the type of the URL --- also known as the scheme.
+ Return the type of the URL --- also known as the scheme. Deprecated in 3.3,
+ use :attr:`Request.type`.
+
+ .. deprecated:: 3.3
.. method:: Request.get_host()
- Return the host to which a connection will be made.
+ Return the host to which a connection will be made. Deprecated in 3.3, use
+ :attr:`Request.host`.
+
+ .. deprecated:: 3.3
.. method:: Request.get_selector()
Return the selector --- the part of the URL that is sent to the server.
+ Deprecated in 3.3, use :attr:`Request.selector`.
-
-.. method:: Request.set_proxy(host, type)
-
- Prepare the request by connecting to a proxy server. The *host* and *type* will
- replace those of the instance, and the instance's selector will be the original
- URL given in the constructor.
+ .. deprecated:: 3.3
.. method:: Request.get_origin_req_host()
- Return the request-host of the origin transaction, as defined by :rfc:`2965`.
- See the documentation for the :class:`Request` constructor.
+ Return the request-host of the origin transaction, as defined by
+ :rfc:`2965`. See the documentation for the :class:`Request` constructor.
+ Deprecated in 3.3, use :attr:`Request.origin_req_host`.
+
+ .. deprecated:: 3.3
.. method:: Request.is_unverifiable()
Return whether the request is unverifiable, as defined by RFC 2965. See the
- documentation for the :class:`Request` constructor.
+ documentation for the :class:`Request` constructor. Deprecated in 3.3, use
+ :attr:`Request.is_unverifiable`.
+
+ .. deprecated:: 3.3
.. _opener-director-objects: