From 7736ab128acd50734881b003c845f63b96f8b61a Mon Sep 17 00:00:00 2001 From: Alexander Loechel Date: Tue, 7 Feb 2017 20:04:30 +0100 Subject: [PATCH] correct params for compile_restricted_function according to old API --- src/RestrictedPython/compile.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/RestrictedPython/compile.py b/src/RestrictedPython/compile.py index 15e3732..d0ac2f7 100644 --- a/src/RestrictedPython/compile.py +++ b/src/RestrictedPython/compile.py @@ -107,10 +107,11 @@ def compile_restricted_single( def compile_restricted_function( - source, + p, + body, + name, filename='', - flags=0, - dont_inherit=0, + globalize=None, policy=RestrictingNodeTransformer): """Compile a restricted code object for a function. @@ -121,17 +122,16 @@ def compile_restricted_function( The globalize argument, if specified, is a list of variable names to be treated as globals (code is generated as if each name in the list appeared in a global statement at the top of the function). - - TODO: Special function not comparable with the other restricted_compile_* - functions. """ - return _compile_restricted_mode( - source, - filename=filename, - mode='function', - flags=flags, - dont_inherit=dont_inherit, - policy=policy) + # TODO: Special function not comparable with the other restricted_compile_* functions. # NOQA + return None + # return _compile_restricted_mode( + # source, + # filename=filename, + # mode='function', + # flags=flags, + # dont_inherit=dont_inherit, + # policy=policy) def compile_restricted(