-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow usage of print()
within safe_exec()
#23084
Conversation
b2e066a
to
1fc5af6
Compare
print()
within safe_eval()
print()
within safe_exec()
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #23084 +/- ##
===========================================
+ Coverage 62.18% 62.22% +0.03%
===========================================
Files 770 770
Lines 73970 73997 +27
Branches 6346 6345 -1
===========================================
+ Hits 45997 46043 +46
- Misses 24361 24364 +3
+ Partials 3612 3590 -22
Flags with carried forward coverage won't be shown. Click here to find out more. |
5491294
to
dd1a275
Compare
918186c
to
84a6747
Compare
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
…tead of `log()` Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
84a6747
to
4ab13ff
Compare
Current state works fine, just has this warning
Comes from https://github.com/zopefoundation/RestrictedPython/blob/master/src/RestrictedPython/transformer.py#L478-L509 |
RestrictedPython warns us if we call `print()` don't use their `printed` variable Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
5d1c6a2
to
5b0150e
Compare
63d6860
to
248919d
Compare
248919d
to
8b87147
Compare
This can be moved to level 2 when required
8b87147
to
7b11e28
Compare
This resolves #22582
print()
can now be used withinsafe_exec()
calls - server scripts, system console, etc.For system console, it shows normally in output
For server scripts, a new field has been added
Debug Log
For doc events and API, the printed values are part of debug log.
[no-docs]