mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)
Automerge-Triggered-By: @tiran
This commit is contained in:
parent
1d541c25c8
commit
fabd7bb8e0
12 changed files with 36 additions and 36 deletions
|
@ -1434,9 +1434,9 @@ class OfflineTest(TestCase):
|
|||
expected = {"responses"} # White-list documented dict() object
|
||||
# HTTPMessage, parse_headers(), and the HTTP status code constants are
|
||||
# intentionally omitted for simplicity
|
||||
blacklist = {"HTTPMessage", "parse_headers"}
|
||||
denylist = {"HTTPMessage", "parse_headers"}
|
||||
for name in dir(client):
|
||||
if name.startswith("_") or name in blacklist:
|
||||
if name.startswith("_") or name in denylist:
|
||||
continue
|
||||
module_object = getattr(client, name)
|
||||
if getattr(module_object, "__module__", None) == "http.client":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue