]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41521: Replace denylist with blocklist is http.cookiejar doc (GH-21826)
authorVictor Stinner <vstinner@python.org>
Thu, 13 Aug 2020 17:20:28 +0000 (19:20 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Aug 2020 17:20:28 +0000 (19:20 +0200)
The http.cookiejar module has is_blocked() and blocked_domains()
methods, so "blocklist" term sounds better than "denylist" in this
module.

Replace also denylisted with denied in test___all__.

Doc/library/http.cookiejar.rst
Lib/test/test___all__.py

index 0a9ee7eb516f4173605d767cfa8e726a480a2b0e..7b1aa80a01797cf940d95908e2d7dfbe59e5ab7b 100644 (file)
@@ -462,8 +462,8 @@ receiving cookies.  There are also some strictness switches that allow you to
 tighten up the rather loose Netscape protocol rules a little bit (at the cost of
 blocking some benign cookies).
 
-A domain denylist and allowlist is provided (both off by default). Only domains
-not in the denylist and present in the allowlist (if the allowlist is active)
+A domain blocklist and allowlist is provided (both off by default). Only domains
+not in the blocklist and present in the allowlist (if the allowlist is active)
 participate in cookie setting and returning.  Use the *blocked_domains*
 constructor argument, and :meth:`blocked_domains` and
 :meth:`set_blocked_domains` methods (and the corresponding argument and methods
@@ -471,7 +471,7 @@ for *allowed_domains*).  If you set an allowlist, you can turn it off again by
 setting it to :const:`None`.
 
 Domains in block or allow lists that do not start with a dot must equal the
-cookie domain to be matched.  For example, ``"example.com"`` matches a denylist
+cookie domain to be matched.  For example, ``"example.com"`` matches a blocklist
 entry of ``"example.com"``, but ``"www.example.com"`` does not.  Domains that do
 start with a dot are matched by more specific domains too. For example, both
 ``"www.example.com"`` and ``"www.coyote.example.com"`` match ``".example.com"``
@@ -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 whether *domain* is on the denylist for setting or receiving cookies.
+   Return whether *domain* is on the blocklist for setting or receiving cookies.
 
 
 .. method:: DefaultCookiePolicy.allowed_domains()
index c6ce64864c0db6d04b13872e38bcd68191e80f47..15f42d2d114a68629182d539163a941eb0b8921e 100644 (file)
@@ -85,13 +85,13 @@ class AllTest(unittest.TestCase):
         lib_dir = os.path.dirname(os.path.dirname(__file__))
         for path, modname in self.walk_modules(lib_dir, ""):
             m = modname
-            denylisted = False
+            denied = False
             while m:
                 if m in denylist:
-                    denylisted = True
+                    denied = True
                     break
                 m = m.rpartition('.')[0]
-            if denylisted:
+            if denied:
                 continue
             if support.verbose:
                 print(modname)