Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05ec6ac

Browse files
committed
Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3
1 parent 650e322 commit 05ec6ac

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

Doc/library/http.cookiejar.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,15 @@ contained :class:`Cookie` objects.
154154

155155
The *request* object (usually a :class:`urllib.request..Request` instance)
156156
must support the methods :meth:`get_full_url`, :meth:`get_host`,
157-
:meth:`get_type`, :meth:`unverifiable`, :meth:`get_origin_req_host`,
158-
:meth:`has_header`, :meth:`get_header`, :meth:`header_items`, and
159-
:meth:`add_unredirected_header`, as documented by :mod:`urllib.request`.
157+
:meth:`get_type`, :meth:`unverifiable`, :meth:`has_header`,
158+
:meth:`get_header`, :meth:`header_items`, :meth:`add_unredirected_header`
159+
and :attr:`origin_req_host` attribute as documented by
160+
:mod:`urllib.request`.
161+
162+
.. versionchanged:: 3.3
163+
164+
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
165+
deprecated method :meth:`get_origin_req_host` has been removed.
160166

161167

162168
.. method:: CookieJar.extract_cookies(response, request)
@@ -174,11 +180,15 @@ contained :class:`Cookie` objects.
174180

175181
The *request* object (usually a :class:`urllib.request.Request` instance)
176182
must support the methods :meth:`get_full_url`, :meth:`get_host`,
177-
:meth:`unverifiable`, and :meth:`get_origin_req_host`, as documented by
178-
:mod:`urllib.request`. The request is used to set default values for
183+
:meth:`unverifiable`, and :attr:`origin_req_host` attribute, as documented
184+
by :mod:`urllib.request`. The request is used to set default values for
179185
cookie-attributes as well as for checking that the cookie is allowed to be
180186
set.
181187

188+
.. versionchanged:: 3.3
189+
190+
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
191+
deprecated method :meth:`get_origin_req_host` has been removed.
182192

183193
.. method:: CookieJar.set_policy(policy)
184194

0 commit comments

Comments
 (0)