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
Fix SyntaxError handling #11
Comments
This might also be caused by changing some bare |
Python 2.7.14 (default, Sep 27 2017, 12:15:00)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> SyntaxError.mro()
[<type 'exceptions.SyntaxError'>,
<type 'exceptions.StandardError'>,
<type 'exceptions.Exception'>,
<type 'exceptions.BaseException'>,
<type 'object'>] Python 3.4.7 (default, Sep 27 2017, 15:47:41)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> SyntaxError.mro()
[<class 'SyntaxError'>,
<class 'Exception'>,
<class 'BaseException'>,
<class 'object'>]
>>> |
…on body. It now also returns a ``CompileResult`` instead of raising a SyntaxError. Fixes zopefoundation/Products.PythonScripts#11
…on body. (#127) It now also returns a ``CompileResult`` instead of raising a SyntaxError. Fixes zopefoundation/Products.PythonScripts#11
I'd prefer not to close bugs via PR merges in another repository: the bug here won't really be fixed until a new release of |
@tseaver You are right, additionally |
@icemac Thanks for fixing the pin! |
It is now rendered as error message like other errors. Fixes zopefoundation#11-
When entering code containing a
SyntaxError
an error page is shown. Previously a warning was rendered above the text area containing the code.Before (Zope 2.13):
After (Zope 4):
Besides the error page shown the changes are not saved!
Maybe this is caused by the changes in RestrictedPython.
The text was updated successfully, but these errors were encountered: