aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-08-11 15:26:59 +0200
committerGitHub <noreply@github.com>2020-08-11 06:26:59 -0700
commitfabd7bb8e0450f16ed5c5c0ad575aa413d65712d (patch)
tree697881ab8dd38a990ebd68a018a20f08c2ab3c67 /Tools
parentbpo-1635741: Port multiprocessing ext to multiphase init (GH-21378) (diff)
downloadcpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.tar.gz
cpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.tar.bz2
cpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.zip
bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)
Automerge-Triggered-By: @tiran
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 92334d9195f..1bbbd4f9fb1 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -4433,7 +4433,7 @@ class DSLParser:
if 'c_default' not in kwargs:
# we can only represent very simple data values in C.
- # detect whether default is okay, via a blacklist
+ # detect whether default is okay, via a denylist
# of disallowed ast nodes.
class DetectBadNodes(ast.NodeVisitor):
bad = False
@@ -4456,9 +4456,9 @@ class DSLParser:
# "starred": "a = [1, 2, 3]; *a"
visit_Starred = bad_node
- blacklist = DetectBadNodes()
- blacklist.visit(module)
- bad = blacklist.bad
+ denylist = DetectBadNodes()
+ denylist.visit(module)
+ bad = denylist.bad
else:
# if they specify a c_default, we can be more lenient about the default value.
# but at least make an attempt at ensuring it's a valid expression.