Skip to content
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

Broken warning about "print" #155

Closed
dataflake opened this issue Apr 7, 2019 · 1 comment · Fixed by #161
Closed

Broken warning about "print" #155

dataflake opened this issue Apr 7, 2019 · 1 comment · Fixed by #161
Assignees
Labels

Comments

@dataflake
Copy link
Member

RestrictedPython tries to be helpful under Python 2 and will generate warnings for print statements. However, it does not distinguisg between real old-style statements like print 'foo' and correct function calls like print('foo').

This will cause incorrect and confusing warnings when editing Python Scripts in the ZMI, including for the default script content that is generated when a user does not upload a file upon script creation time.

Please make that check a little more restrictive.

@dataflake dataflake added the bug label Apr 7, 2019
@dataflake
Copy link
Member Author

Corresponding to issue zopefoundation/Products.PythonScripts#26

@dhavlik dhavlik self-assigned this May 8, 2019
dhavlik pushed a commit that referenced this issue May 8, 2019
…less because a) its wrong, since its also displayed when you already use the print function and b) the actual error message when using py3 is far more precise and useful and finally c) we don't use deprecation warnings elsewhere
dhavlik pushed a commit that referenced this issue May 8, 2019
Its useless because a) its wrong, since its also displayed when you already use the print function and b) the actual error message when using py3 is far more precise and useful and finally c) we don't use deprecation warnings elsewhere (#161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants