This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markus
Recipients docs@python, markus
Date 2020-10-14.15:23:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602689022.88.0.876415237077.issue42037@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-10-14 15:23:42markussetrecipients: + markus, docs@python
2020-10-14 15:23:42markussetmessageid: <1602689022.88.0.876415237077.issue42037@roundup.psfhosted.org>
2020-10-14 15:23:42markuslinkissue42037 messages
2020-10-14 15:23:42markuscreate