Skip to content

Conversation

@icemac
Copy link
Member

@icemac icemac commented Oct 6, 2017

PyPy cannot be restricted enough by RestrictedPython.
Other implementation might have other or similar issues.

PyPy cannot be restricted enough by RestrictedPython.
Other implementation might have other or similar issues.
errors = []
warnings = []
collected_errors = []
collected_warnings = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this refactoring have to do with the "not on PyPy" purpose of the PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings variable shadows the warnings module which is now needed some lines after the variable definition. I did not want to change only the name of one variable.

docs/CHANGES.rst Outdated
`tests/verify.py`.

- Drop support of PyPy as there currently seems to be no way to restrict the
- Drop support of PyPy as there currently is no way to restrict the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Drop support for PyPy" seems more idiomatic.

NOT_CPYTHON_WARNING = (
'You are using on a not supported Python implementation.'
' Use CPython to prevent security issues when using RestrictedPython!')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message would read better as:

NOT_CPYTHON_WARNING = (
    'RestrictedPython is only supported on CPython: use on other Python '
    'implementations may create security issues.'
)

@loechel
Copy link
Member

loechel commented Oct 9, 2017

The Tests for the warning seems not to work in PyPy. @icemac could you have another look.

This way the second (now deleted test) failed on PyPy.
@icemac
Copy link
Member Author

icemac commented Oct 13, 2017

@loechel It worked on CPython because the warning was only emitted once. Are you okay with emitting a warning every time the function is used?

@icemac icemac requested a review from loechel October 13, 2017 06:51
@icemac
Copy link
Member Author

icemac commented Oct 13, 2017

@tseaver Are you okay with my changes?

@loechel
Copy link
Member

loechel commented Oct 13, 2017

@icemac I am ok, with warnings.warn_explicte, as that makes more sense, and helps if we want to try to make pypy in the long run possible.

I would like to have the explicite test keeped that runs on the can fail branch pypy in travis-ci.

Copy link
Member

@loechel loechel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All questions answered and changes makes sense

@icemac icemac merged commit 89f3df2 into master Oct 18, 2017
@icemac icemac deleted the warn-when-not-cpython branch October 18, 2017 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants