diff options
Diffstat (limited to 'lib/sqlalchemy/sql/lambdas.py')
-rw-r--r-- | lib/sqlalchemy/sql/lambdas.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/lambdas.py b/lib/sqlalchemy/sql/lambdas.py index 2b77b8743..ebf576c8f 100644 --- a/lib/sqlalchemy/sql/lambdas.py +++ b/lib/sqlalchemy/sql/lambdas.py @@ -25,6 +25,7 @@ from .. import exc from .. import inspection from .. import util from ..util import collections_abc +from ..util import compat _closure_per_cache_key = util.LRUCache(1000) @@ -1064,7 +1065,7 @@ class AnalyzedFunction(object): code += " return %s\n" % ", ".join("i%d" % i for i in argrange) code += " return closure.__closure__" vars_ = {"o%d" % i: cell_values[i] for i in argrange} - exec(code, vars_, vars_) + compat.exec_(code, vars_, vars_) closure = vars_["make_cells"]() func = type(f)( |