- Add support for (Python 3.8+) assignment expressions (i.e. the
- Add support for Python 3.9 after checking the security implications of the syntax changes made in that version.
- Add support for the
- Revert the Allowance of the
...(Ellipsis) statement, as of 4.0. It is not needed to support Python 3.8. The security implications of the Ellipsis Statement is not 100 % clear and is not checked.
...(Ellipsis) is disallowed again.
Changes since 3.6.0:
compile_restricted*functions now return a
namedtuple CompileResultinstead of a simple
- Drop the old implementation of version 3.x: RCompile.py, SelectCompiler.py, MutatingWorker.py, RestrictionMutator.py and tests/verify.py.
- Drop support for long-deprecated
- Mostly complete rewrite based on Python AST module. [loechel (Alexander Loechel), icemac (Michael Howitz), stephan-hof (Stephan Hofmockel), tlotze (Thomas Lotze)]
- Add support for Python 3.5, 3.6, 3.7.
- Add preliminary support for Python 3.8. as of 3.8.0a3 is released.
- Warn when using another Python implementation than CPython as it is not safe to use RestrictedPython with other versions than CPyton. See https://bitbucket.org/pypy/pypy/issues/2653 for PyPy.
- Allow the
...(Ellipsis) statement. It is needed to support Python 3.8.
- Allow yield and yield from statements. Generator functions would now work in RestrictedPython.
- Allow the following magic methods to be defined on classes.
They cannot be called directly but by the built-in way to use them (e. g.
class instantiation, or comparison):
- Imports like
from a import *(so called star imports) are now forbidden as they allow to import names starting with an underscore which could override protected build-ins. (#102)
- Allow to use list comprehensions in the default implementation of
- Switch to pytest as test runner.
- Bring test coverage to 100 %.
- Add name check for names assigned during imports using the
from x import yformat.
- Add test for name check when assigning an alias using multiple-context
withstatements in Python 2.7.
- Add tests for protection of the iterators for dict and set comprehensions in Python 2.7.
- Remove support for
DocumentTemplate.sequence- this is handled in the DocumentTemplate package itself.
- Remove a testing dependency on
- Add tests for
- Filter DeprecationWarnings when importing Python’s
- Drop legacy support for Python 2.1 / 2.2 (
- Fix deprecation warning:
withis now a reserved keyword on Python 2.6. That means RestrictedPython should run on Python 2.6 now. Thanks to Ranjith Kannikara, GSoC Student for the patch.
- Add tests for ternary if expression and for
withkeyword and context managers.
- Changed homepage URL to the PyPI site
- Fix http://www.zope.org/Collectors/Zope/2295: Bare conditional in a Zope 2 PythonScript followed by a comment causes SyntaxError.
- RestrictedPython now has its own release cycle as a separate project.
- Synchronized with RestrictedPython from Zope 2 tree.
- Corresponds to the verison of the RestrictedPython package shipped as part of the Zope 3.2.0 release.
- No changes from 3.1.0.
- Corresponds to the verison of the RestrictedPython package shipped as part of the Zope 3.1.0 release.
- Remove unused fossil module,
- Replaced use of deprecated
whrandomfor backward compatibility).
- Corresponds to the verison of the RestrictedPython package shipped as part of the Zope X3.0.0 release.