Kaydet (Commit) cbc77bbb authored tarafından Senthil Kumaran's avatar Senthil Kumaran

merge from 3.3

Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3 and 3.4.
...@@ -154,9 +154,15 @@ contained :class:`Cookie` objects. ...@@ -154,9 +154,15 @@ contained :class:`Cookie` objects.
The *request* object (usually a :class:`urllib.request..Request` instance) The *request* object (usually a :class:`urllib.request..Request` instance)
must support the methods :meth:`get_full_url`, :meth:`get_host`, must support the methods :meth:`get_full_url`, :meth:`get_host`,
:meth:`get_type`, :meth:`unverifiable`, :meth:`get_origin_req_host`, :meth:`get_type`, :meth:`unverifiable`, :meth:`has_header`,
:meth:`has_header`, :meth:`get_header`, :meth:`header_items`, and :meth:`get_header`, :meth:`header_items`, :meth:`add_unredirected_header`
:meth:`add_unredirected_header`, as documented by :mod:`urllib.request`. and :attr:`origin_req_host` attribute as documented by
:mod:`urllib.request`.
.. versionchanged:: 3.3
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
deprecated method :meth:`get_origin_req_host` has been removed.
.. method:: CookieJar.extract_cookies(response, request) .. method:: CookieJar.extract_cookies(response, request)
...@@ -174,11 +180,15 @@ contained :class:`Cookie` objects. ...@@ -174,11 +180,15 @@ contained :class:`Cookie` objects.
The *request* object (usually a :class:`urllib.request.Request` instance) The *request* object (usually a :class:`urllib.request.Request` instance)
must support the methods :meth:`get_full_url`, :meth:`get_host`, must support the methods :meth:`get_full_url`, :meth:`get_host`,
:meth:`unverifiable`, and :meth:`get_origin_req_host`, as documented by :meth:`unverifiable`, and :attr:`origin_req_host` attribute, as documented
:mod:`urllib.request`. The request is used to set default values for by :mod:`urllib.request`. The request is used to set default values for
cookie-attributes as well as for checking that the cookie is allowed to be cookie-attributes as well as for checking that the cookie is allowed to be
set. set.
.. versionchanged:: 3.3
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
deprecated method :meth:`get_origin_req_host` has been removed.
.. method:: CookieJar.set_policy(policy) .. method:: CookieJar.set_policy(policy)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment