New submission from Markus Israelsson <markus.israels...@surgicalscience.com>:

The documentation in 
https://docs.python.org/3.8/library/http.cookiejar.html#http.cookiejar.CookieJar
claims the following for functions add_cookie_header and extract_cookies.

***
The request object (usually a urllib.request.Request instance) must support the 
methods get_full_url(), get_host(), get_type(), unverifiable(), has_header(), 
get_header(), header_items(), add_unredirected_header() and origin_req_host 
attribute as documented by urllib.request.
***


When reading the documentation for Request Objects 
https://docs.python.org/3.8/library/urllib.request.html?highlight=requests#request-objects
there is this:
***
Changed in version 3.4: The request methods add_data, has_data, get_data, 
get_type, get_host, get_selector, get_origin_req_host and is_unverifiable that 
were deprecated since 3.3 have been removed.
***

So basically the documentation claims that if the request object does not 
support functions that are removed then the headers will not be added. The code 
itself seem to do the correct thing however and add the header.

----------
assignee: docs@python
components: Documentation
messages: 378624
nosy: docs@python, markus
priority: normal
severity: normal
status: open
title: Documentation confusion in CookieJar functions
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42037>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to