From 8abb3c7310b387e54d977ad76ff8118dffe82ce0 Mon Sep 17 00:00:00 2001 From: Emmanuel Arias Date: Fri, 12 Feb 2021 20:56:07 -0300 Subject: [PATCH 1/3] Add missing value returned by methods on cookiejar Documentation say that return something but don't specific with what value is return, and that can be confuse. This patch add that information. --- Doc/library/http.cookiejar.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 7b1aa80a01797c..655d40d8de4123 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -494,7 +494,8 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_blocked(domain) - Return whether *domain* is on the blocklist for setting or receiving cookies. + Return ``True`` whether *domain* is on the blocklist for setting or receiving + cookies. .. method:: DefaultCookiePolicy.allowed_domains() @@ -509,7 +510,7 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_not_allowed(domain) - Return whether *domain* is not on the allowlist for setting or receiving + Return ``True`` whether *domain* is not on the allowlist for setting or receiving cookies. :class:`DefaultCookiePolicy` instances have the following attributes, which are From ea6f5352b290566860993a3399c9fc72af171ab9 Mon Sep 17 00:00:00 2001 From: Emmanuel Arias Date: Wed, 7 Jul 2021 12:51:41 -0300 Subject: [PATCH 2/3] Update Doc/library/http.cookiejar.rst Co-authored-by: andrei kulakov --- Doc/library/http.cookiejar.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 655d40d8de4123..fb6f76ffd90352 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -494,7 +494,7 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_blocked(domain) - Return ``True`` whether *domain* is on the blocklist for setting or receiving + Return ``True`` if *domain* is on the blocklist for setting or receiving cookies. @@ -767,4 +767,3 @@ returned:: cj = CookieJar(policy) opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj)) r = opener.open("http://example.com/") - From f7789e07eb645367e2a2d09e11d8a8614946d31f Mon Sep 17 00:00:00 2001 From: Emmanuel Arias Date: Wed, 7 Jul 2021 12:51:46 -0300 Subject: [PATCH 3/3] Update Doc/library/http.cookiejar.rst Co-authored-by: andrei kulakov --- Doc/library/http.cookiejar.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index fb6f76ffd90352..906b914831c079 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -510,7 +510,7 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_not_allowed(domain) - Return ``True`` whether *domain* is not on the allowlist for setting or receiving + Return ``True`` if *domain* is not on the allowlist for setting or receiving cookies. :class:`DefaultCookiePolicy` instances have the following attributes, which are