Skip to content

Commit 3d30efe

Browse files
authored
Python: Add exec as a shared built-in
This is _slightly_ wrong, since `exec` isn't a built-in function in Python 2. It should be harmless, however, since `exec` is a keyword, and so cannot be redefined anyway.
1 parent 5c7e73d commit 3d30efe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/ql/src/semmle/python/ApiGraphs.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ module API {
372372
"RuntimeWarning", "StandardError", "StopIteration", "SyntaxError", "SyntaxWarning",
373373
"SystemError", "SystemExit", "TabError", "TypeError", "UnboundLocalError",
374374
"UnicodeDecodeError", "UnicodeEncodeError", "UnicodeError", "UnicodeTranslateError",
375-
"UnicodeWarning", "UserWarning", "ValueError", "Warning", "ZeroDivisionError"
375+
"UnicodeWarning", "UserWarning", "ValueError", "Warning", "ZeroDivisionError",
376+
// Added for compatibility
377+
"exec"
376378
]
377379
or
378380
// Built-in constants shared between Python 2 and 3

0 commit comments

Comments
 (0)