The compile_restricted function can produce harmless warnings that clutter up console.
I recommend they be suppressed with something like:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
compile_restricted(
python_code, filename="<dynamic>", mode="exec"
)
The compile_restricted function can produce harmless warnings that clutter up console.
I recommend they be suppressed with something like: