RestrictedPython 7.4__tar.gz → 8.1a1.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/.pre-commit-config.yaml +5 -5
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/CHANGES.rst +28 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/CONTRIBUTING.md +1 -1
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/PKG-INFO +44 -5
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/conf.py +2 -3
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/index.rst +5 -11
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/index.rst +1 -1
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/pyproject.toml +15 -3
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/setup.py +3 -4
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/Guards.py +0 -4
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/transformer.py +2 -2
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/PKG-INFO +44 -5
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/SOURCES.txt +0 -22
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_try.py +7 -13
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tox.ini +8 -4
- restrictedpython-7.4/docs/_build/doctest/output.txt +0 -35
- restrictedpython-7.4/docs/_build/html/_sources/changes.rst.txt +0 -1
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from310to311.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from311to312.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from312to313.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from37to38.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from38to39.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from39to310.rst.txt +0 -5
- restrictedpython-7.4/docs/_build/html/_sources/contributing/index.rst.txt +0 -308
- restrictedpython-7.4/docs/_build/html/_sources/idea.rst.txt +0 -85
- restrictedpython-7.4/docs/_build/html/_sources/index.rst.txt +0 -42
- restrictedpython-7.4/docs/_build/html/_sources/install/index.rst.txt +0 -10
- restrictedpython-7.4/docs/_build/html/_sources/roadmap/index.rst.txt +0 -33
- restrictedpython-7.4/docs/_build/html/_sources/usage/api.rst.txt +0 -139
- restrictedpython-7.4/docs/_build/html/_sources/usage/basic_usage.rst.txt +0 -175
- restrictedpython-7.4/docs/_build/html/_sources/usage/framework_usage.rst.txt +0 -86
- restrictedpython-7.4/docs/_build/html/_sources/usage/index.rst.txt +0 -9
- restrictedpython-7.4/docs/_build/html/_sources/usage/policy.rst.txt +0 -237
- restrictedpython-7.4/docs/_build/html/_static/scripts/furo.js.LICENSE.txt +0 -7
- restrictedpython-7.4/docs/contributing/ast/python3_7.ast +0 -175
- restrictedpython-7.4/docs/contributing/changes_from37to38.rst +0 -5
- restrictedpython-7.4/docs/logo.jpg +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/.readthedocs.yaml +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/COPYRIGHT.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/LICENSE.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/MANIFEST.in +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/README.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/buildout.cfg +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/constraints.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/Makefile +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/changes.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_10.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_11.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_12.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_13.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_8.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/ast/python3_9.ast +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/changes_from310to311.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/changes_from311to312.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/changes_from312to313.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/changes_from38to39.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/contributing/changes_from39to310.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/idea.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/install/index.rst +0 -0
- {restrictedpython-7.4/docs/_build/html/_images → restrictedpython-8.1a1.dev0/docs}/logo.jpg +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/make.bat +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/requirements.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/roadmap/index.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/usage/api.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/usage/basic_usage.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/usage/framework_usage.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/usage/index.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/docs/usage/policy.rst +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/setup.cfg +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/Eval.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/Limits.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/PrintCollector.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/Utilities.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/__init__.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/_compat.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython/compile.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/dependency_links.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/not-zip-safe +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/requires.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/top_level.txt +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/__init__.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/builtins/test_limits.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/builtins/test_utilities.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/helper.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_Guards.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_NamedExpr.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_Utilities.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_compile.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_compile_restricted_function.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_eval.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_imports.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_iterating_over_dict_items.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/test_print_function.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_arithmetic_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_bit_wise_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_bool_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_comparison_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_identity_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_logical_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/operators/test_unary_operators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_assert.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_assign.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_async.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_attribute.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_augassign.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_base_types.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_breakpoint.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_call.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_classdef.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_comparators.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_conditional.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_dict_comprehension.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_eval_exec.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_fstring.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_functiondef.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_generic.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_global_local.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_import.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_inspect.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_iterator.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_lambda.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_loop.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_name.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_slice.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_subscript.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_with_stmt.py +0 -0
- {restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/tests/transformer/test_yield.py +0 -0
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
minimum_pre_commit_version: '3.6'
|
|
4
4
|
repos:
|
|
5
5
|
- repo: https://github.com/pycqa/isort
|
|
6
|
-
rev: "
|
|
6
|
+
rev: "6.0.1"
|
|
7
7
|
hooks:
|
|
8
8
|
- id: isort
|
|
9
9
|
- repo: https://github.com/hhatto/autopep8
|
|
10
|
-
rev: "v2.3.
|
|
10
|
+
rev: "v2.3.2"
|
|
11
11
|
hooks:
|
|
12
12
|
- id: autopep8
|
|
13
13
|
args: [--in-place, --aggressive, --aggressive]
|
|
14
14
|
- repo: https://github.com/asottile/pyupgrade
|
|
15
|
-
rev: v3.
|
|
15
|
+
rev: v3.19.1
|
|
16
16
|
hooks:
|
|
17
17
|
- id: pyupgrade
|
|
18
|
-
args: [--
|
|
18
|
+
args: [--py39-plus]
|
|
19
19
|
- repo: https://github.com/isidentical/teyit
|
|
20
20
|
rev: 0.4.3
|
|
21
21
|
hooks:
|
|
22
22
|
- id: teyit
|
|
23
23
|
- repo: https://github.com/PyCQA/flake8
|
|
24
|
-
rev: "7.1.
|
|
24
|
+
rev: "7.1.2"
|
|
25
25
|
hooks:
|
|
26
26
|
- id: flake8
|
|
27
27
|
additional_dependencies:
|
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
8.1a1.dev0 (2025-03-20)
|
|
5
|
+
-----------------------
|
|
6
|
+
|
|
7
|
+
- Allow to use the package with Python 3.14 -- Caution: No security
|
|
8
|
+
audit has been done so far.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
8.0 (2025-01-23)
|
|
12
|
+
----------------
|
|
13
|
+
|
|
14
|
+
Backwards incompatible changes
|
|
15
|
+
++++++++++++++++++++++++++++++
|
|
16
|
+
|
|
17
|
+
- Disallow ``try/except*`` clauses due to a possible sandbox escape and
|
|
18
|
+
probable uselessness of this feature in the context of ``RestrictedPython``.
|
|
19
|
+
In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
|
|
20
|
+
with ``try/except*``). - This feature was introduced into
|
|
21
|
+
``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
|
|
22
|
+
|
|
23
|
+
- Drop support for Python 3.8.
|
|
24
|
+
|
|
25
|
+
Features
|
|
26
|
+
++++++++
|
|
27
|
+
|
|
28
|
+
- Update setuptools version pin.
|
|
29
|
+
(`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
|
|
30
|
+
|
|
31
|
+
|
|
4
32
|
7.4 (2024-10-09)
|
|
5
33
|
----------------
|
|
6
34
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: RestrictedPython
|
|
3
|
-
Version:
|
|
3
|
+
Version: 8.1a1.dev0
|
|
4
4
|
Summary: RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment.
|
|
5
5
|
Home-page: https://github.com/zopefoundation/RestrictedPython
|
|
6
6
|
Author: Zope Foundation and Contributors
|
|
7
7
|
Author-email: zope-dev@zope.dev
|
|
8
|
-
License: ZPL
|
|
8
|
+
License: ZPL-2.1
|
|
9
9
|
Project-URL: Documentation, https://restrictedpython.readthedocs.io/
|
|
10
10
|
Project-URL: Source, https://github.com/zopefoundation/RestrictedPython
|
|
11
11
|
Project-URL: Tracker, https://github.com/zopefoundation/RestrictedPython/issues
|
|
@@ -15,7 +15,6 @@ Classifier: License :: OSI Approved :: Zope Public License
|
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -23,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
25
24
|
Classifier: Topic :: Security
|
|
26
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.9, <3.15
|
|
27
26
|
Description-Content-Type: text/x-rst
|
|
28
27
|
License-File: LICENSE.txt
|
|
29
28
|
Provides-Extra: test
|
|
@@ -32,6 +31,18 @@ Requires-Dist: pytest-mock; extra == "test"
|
|
|
32
31
|
Provides-Extra: docs
|
|
33
32
|
Requires-Dist: Sphinx; extra == "docs"
|
|
34
33
|
Requires-Dist: furo; extra == "docs"
|
|
34
|
+
Dynamic: author
|
|
35
|
+
Dynamic: author-email
|
|
36
|
+
Dynamic: classifier
|
|
37
|
+
Dynamic: description
|
|
38
|
+
Dynamic: description-content-type
|
|
39
|
+
Dynamic: home-page
|
|
40
|
+
Dynamic: keywords
|
|
41
|
+
Dynamic: license
|
|
42
|
+
Dynamic: project-url
|
|
43
|
+
Dynamic: provides-extra
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
Dynamic: summary
|
|
35
46
|
|
|
36
47
|
.. image:: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml/badge.svg
|
|
37
48
|
:target: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml
|
|
@@ -124,6 +135,34 @@ the documentation `Contributing page
|
|
|
124
135
|
Changes
|
|
125
136
|
=======
|
|
126
137
|
|
|
138
|
+
8.1a1.dev0 (2025-03-20)
|
|
139
|
+
-----------------------
|
|
140
|
+
|
|
141
|
+
- Allow to use the package with Python 3.14 -- Caution: No security
|
|
142
|
+
audit has been done so far.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
8.0 (2025-01-23)
|
|
146
|
+
----------------
|
|
147
|
+
|
|
148
|
+
Backwards incompatible changes
|
|
149
|
+
++++++++++++++++++++++++++++++
|
|
150
|
+
|
|
151
|
+
- Disallow ``try/except*`` clauses due to a possible sandbox escape and
|
|
152
|
+
probable uselessness of this feature in the context of ``RestrictedPython``.
|
|
153
|
+
In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
|
|
154
|
+
with ``try/except*``). - This feature was introduced into
|
|
155
|
+
``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
|
|
156
|
+
|
|
157
|
+
- Drop support for Python 3.8.
|
|
158
|
+
|
|
159
|
+
Features
|
|
160
|
+
++++++++
|
|
161
|
+
|
|
162
|
+
- Update setuptools version pin.
|
|
163
|
+
(`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
|
|
164
|
+
|
|
165
|
+
|
|
127
166
|
7.4 (2024-10-09)
|
|
128
167
|
----------------
|
|
129
168
|
|
|
@@ -60,9 +60,9 @@ author = 'The Zope & Plone developer community'
|
|
|
60
60
|
# built documents.
|
|
61
61
|
#
|
|
62
62
|
# The short X.Y version.
|
|
63
|
-
version = '7.
|
|
63
|
+
version = '7.5'
|
|
64
64
|
# The full version, including alpha/beta/rc tags.
|
|
65
|
-
release = '7.
|
|
65
|
+
release = '7.5'
|
|
66
66
|
|
|
67
67
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
68
68
|
# for a list of supported languages.
|
|
@@ -112,7 +112,6 @@ todo_include_todos = True
|
|
|
112
112
|
# Intersphinx Mapping for Links between different Documentations
|
|
113
113
|
intersphinx_mapping = {
|
|
114
114
|
'python3': ('https://docs.python.org/3', None),
|
|
115
|
-
'python38': ('https://docs.python.org/3.8', None),
|
|
116
115
|
'python39': ('https://docs.python.org/3.9', None),
|
|
117
116
|
'python310': ('https://docs.python.org/3.10', None),
|
|
118
117
|
'python311': ('https://docs.python.org/3.11', None),
|
|
@@ -98,7 +98,6 @@ A (modified style) Copy of all Abstract Grammar Definitions for the Python versi
|
|
|
98
98
|
.. toctree::
|
|
99
99
|
:maxdepth: 2
|
|
100
100
|
|
|
101
|
-
changes_from37to38
|
|
102
101
|
changes_from38to39
|
|
103
102
|
changes_from39to310
|
|
104
103
|
changes_from310to311
|
|
@@ -236,12 +235,11 @@ Technical Backgrounds - Links to External Documentation
|
|
|
236
235
|
|
|
237
236
|
* AST Grammar of Python (`Status of Python Versions`_)
|
|
238
237
|
|
|
238
|
+
* `Python 3.13 AST`_ (EOL 2029-10)
|
|
239
239
|
* `Python 3.12 AST`_ (EOL 2028-10)
|
|
240
240
|
* `Python 3.11 AST`_ (EOL 2027-10)
|
|
241
241
|
* `Python 3.10 AST`_ (EOL 2026-10)
|
|
242
242
|
* `Python 3.9 AST`_ (EOL 2025-10)
|
|
243
|
-
* `Python 3.8 AST`_ (EOL 2024-10)
|
|
244
|
-
* `Python 3.7 AST`_ (EOL 2023-06-27)
|
|
245
243
|
|
|
246
244
|
* `AST NodeVistiors Class`_
|
|
247
245
|
* `AST NodeTransformer Class`_
|
|
@@ -259,6 +257,8 @@ Todos
|
|
|
259
257
|
|
|
260
258
|
.. _`What's new in Python`: https://docs.python.org/3/whatsnew/
|
|
261
259
|
|
|
260
|
+
.. _`What's new in Python 3.13`: https://docs.python.org/3.13/whatsnew/3.13.html
|
|
261
|
+
|
|
262
262
|
.. _`What's new in Python 3.12`: https://docs.python.org/3.12/whatsnew/3.12.html
|
|
263
263
|
|
|
264
264
|
.. _`What's new in Python 3.11`: https://docs.python.org/3.11/whatsnew/3.11.html
|
|
@@ -267,10 +267,6 @@ Todos
|
|
|
267
267
|
|
|
268
268
|
.. _`What's new in Python 3.9`: https://docs.python.org/3.9/whatsnew/3.9.html
|
|
269
269
|
|
|
270
|
-
.. _`What's new in Python 3.8`: https://docs.python.org/3.8/whatsnew/3.8.html
|
|
271
|
-
|
|
272
|
-
.. _`What's new in Python 3.7`: https://docs.python.org/3.7/whatsnew/3.7.html
|
|
273
|
-
|
|
274
270
|
.. _`Status of Python Versions`: https://devguide.python.org/versions/
|
|
275
271
|
|
|
276
272
|
.. _`Concept of Immutable Types and Python Example`: https://en.wikipedia.org/wiki/Immutable_object#Python
|
|
@@ -285,6 +281,8 @@ Todos
|
|
|
285
281
|
|
|
286
282
|
.. _`Python 3 AST`: https://docs.python.org/3/library/ast.html#abstract-grammar
|
|
287
283
|
|
|
284
|
+
.. _`Python 3.13 AST`: https://docs.python.org/3.13/library/ast.html#abstract-grammar
|
|
285
|
+
|
|
288
286
|
.. _`Python 3.12 AST`: https://docs.python.org/3.12/library/ast.html#abstract-grammar
|
|
289
287
|
|
|
290
288
|
.. _`Python 3.11 AST`: https://docs.python.org/3.11/library/ast.html#abstract-grammar
|
|
@@ -293,10 +291,6 @@ Todos
|
|
|
293
291
|
|
|
294
292
|
.. _`Python 3.9 AST`: https://docs.python.org/3.9/library/ast.html#abstract-grammar
|
|
295
293
|
|
|
296
|
-
.. _`Python 3.8 AST`: https://docs.python.org/3.8/library/ast.html#abstract-grammar
|
|
297
|
-
|
|
298
|
-
.. _`Python 3.7 AST`: https://docs.python.org/3.7/library/ast.html#abstract-grammar
|
|
299
|
-
|
|
300
294
|
.. _`AST NodeVistiors Class`: https://docs.python.org/3/library/ast.html#ast.NodeVisitor
|
|
301
295
|
|
|
302
296
|
.. _`AST NodeTransformer Class`: https://docs.python.org/3/library/ast.html#ast.NodeTransformer
|
|
@@ -15,7 +15,7 @@ RestrictedPython is not a sandbox system or a secured environment, but it helps
|
|
|
15
15
|
Supported Python versions
|
|
16
16
|
=========================
|
|
17
17
|
|
|
18
|
-
RestrictedPython supports CPython 3.
|
|
18
|
+
RestrictedPython supports CPython 3.9 up to 3.13.
|
|
19
19
|
It does _not_ support PyPy or other alternative Python implementations.
|
|
20
20
|
|
|
21
21
|
Contents
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
|
|
4
4
|
|
|
5
5
|
[build-system]
|
|
6
|
-
requires = [
|
|
6
|
+
requires = [
|
|
7
|
+
"setuptools == 75.8.2",
|
|
8
|
+
"wheel",
|
|
9
|
+
]
|
|
7
10
|
build-backend = "setuptools.build_meta"
|
|
8
11
|
|
|
9
12
|
[tool.coverage.run]
|
|
@@ -11,11 +14,20 @@ branch = true
|
|
|
11
14
|
source = ["RestrictedPython"]
|
|
12
15
|
|
|
13
16
|
[tool.coverage.report]
|
|
14
|
-
fail_under = 97.
|
|
17
|
+
fail_under = 97.3
|
|
15
18
|
precision = 2
|
|
16
19
|
ignore_errors = true
|
|
17
20
|
show_missing = true
|
|
18
|
-
exclude_lines = [
|
|
21
|
+
exclude_lines = [
|
|
22
|
+
"pragma: no cover",
|
|
23
|
+
"pragma: nocover",
|
|
24
|
+
"except ImportError:",
|
|
25
|
+
"raise NotImplementedError",
|
|
26
|
+
"if __name__ == '__main__':",
|
|
27
|
+
"self.fail",
|
|
28
|
+
"raise AssertionError",
|
|
29
|
+
"raise unittest.Skip",
|
|
30
|
+
]
|
|
19
31
|
|
|
20
32
|
[tool.coverage.html]
|
|
21
33
|
directory = "parts/htmlcov"
|
|
@@ -25,9 +25,9 @@ def read(*rnames):
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
setup(name='RestrictedPython',
|
|
28
|
-
version='
|
|
28
|
+
version='8.1a1.dev0',
|
|
29
29
|
url='https://github.com/zopefoundation/RestrictedPython',
|
|
30
|
-
license='ZPL
|
|
30
|
+
license='ZPL-2.1',
|
|
31
31
|
description=(
|
|
32
32
|
'RestrictedPython is a defined subset of the Python language which '
|
|
33
33
|
'allows to provide a program input into a trusted environment.'),
|
|
@@ -39,7 +39,6 @@ setup(name='RestrictedPython',
|
|
|
39
39
|
'Programming Language :: Python',
|
|
40
40
|
'Operating System :: OS Independent',
|
|
41
41
|
'Programming Language :: Python :: 3',
|
|
42
|
-
'Programming Language :: Python :: 3.8',
|
|
43
42
|
'Programming Language :: Python :: 3.9',
|
|
44
43
|
'Programming Language :: Python :: 3.10',
|
|
45
44
|
'Programming Language :: Python :: 3.11',
|
|
@@ -60,7 +59,7 @@ setup(name='RestrictedPython',
|
|
|
60
59
|
packages=find_packages('src'),
|
|
61
60
|
package_dir={'': 'src'},
|
|
62
61
|
install_requires=[],
|
|
63
|
-
python_requires=">=3.
|
|
62
|
+
python_requires=">=3.9, <3.15",
|
|
64
63
|
extras_require={
|
|
65
64
|
'test': ['pytest', 'pytest-mock'],
|
|
66
65
|
'docs': ['Sphinx', 'furo'],
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
import builtins
|
|
19
19
|
|
|
20
|
-
from RestrictedPython._compat import IS_PY311_OR_GREATER
|
|
21
20
|
from RestrictedPython.transformer import INSPECT_ATTRIBUTES
|
|
22
21
|
|
|
23
22
|
|
|
@@ -106,9 +105,6 @@ _safe_exceptions = [
|
|
|
106
105
|
'ZeroDivisionError',
|
|
107
106
|
]
|
|
108
107
|
|
|
109
|
-
if IS_PY311_OR_GREATER:
|
|
110
|
-
_safe_exceptions.append("ExceptionGroup")
|
|
111
|
-
|
|
112
108
|
for name in _safe_names:
|
|
113
109
|
safe_builtins[name] = getattr(builtins, name)
|
|
114
110
|
|
|
@@ -1141,8 +1141,8 @@ class RestrictingNodeTransformer(ast.NodeTransformer):
|
|
|
1141
1141
|
return self.node_contents_visit(node)
|
|
1142
1142
|
|
|
1143
1143
|
def visit_TryStar(self, node):
|
|
1144
|
-
"""
|
|
1145
|
-
|
|
1144
|
+
"""Disallow `ExceptionGroup` due to a potential sandbox escape."""
|
|
1145
|
+
self.not_allowed(node)
|
|
1146
1146
|
|
|
1147
1147
|
def visit_ExceptHandler(self, node):
|
|
1148
1148
|
"""Protect exception handlers."""
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: RestrictedPython
|
|
3
|
-
Version:
|
|
3
|
+
Version: 8.1a1.dev0
|
|
4
4
|
Summary: RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment.
|
|
5
5
|
Home-page: https://github.com/zopefoundation/RestrictedPython
|
|
6
6
|
Author: Zope Foundation and Contributors
|
|
7
7
|
Author-email: zope-dev@zope.dev
|
|
8
|
-
License: ZPL
|
|
8
|
+
License: ZPL-2.1
|
|
9
9
|
Project-URL: Documentation, https://restrictedpython.readthedocs.io/
|
|
10
10
|
Project-URL: Source, https://github.com/zopefoundation/RestrictedPython
|
|
11
11
|
Project-URL: Tracker, https://github.com/zopefoundation/RestrictedPython/issues
|
|
@@ -15,7 +15,6 @@ Classifier: License :: OSI Approved :: Zope Public License
|
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -23,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
25
24
|
Classifier: Topic :: Security
|
|
26
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.9, <3.15
|
|
27
26
|
Description-Content-Type: text/x-rst
|
|
28
27
|
License-File: LICENSE.txt
|
|
29
28
|
Provides-Extra: test
|
|
@@ -32,6 +31,18 @@ Requires-Dist: pytest-mock; extra == "test"
|
|
|
32
31
|
Provides-Extra: docs
|
|
33
32
|
Requires-Dist: Sphinx; extra == "docs"
|
|
34
33
|
Requires-Dist: furo; extra == "docs"
|
|
34
|
+
Dynamic: author
|
|
35
|
+
Dynamic: author-email
|
|
36
|
+
Dynamic: classifier
|
|
37
|
+
Dynamic: description
|
|
38
|
+
Dynamic: description-content-type
|
|
39
|
+
Dynamic: home-page
|
|
40
|
+
Dynamic: keywords
|
|
41
|
+
Dynamic: license
|
|
42
|
+
Dynamic: project-url
|
|
43
|
+
Dynamic: provides-extra
|
|
44
|
+
Dynamic: requires-python
|
|
45
|
+
Dynamic: summary
|
|
35
46
|
|
|
36
47
|
.. image:: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml/badge.svg
|
|
37
48
|
:target: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml
|
|
@@ -124,6 +135,34 @@ the documentation `Contributing page
|
|
|
124
135
|
Changes
|
|
125
136
|
=======
|
|
126
137
|
|
|
138
|
+
8.1a1.dev0 (2025-03-20)
|
|
139
|
+
-----------------------
|
|
140
|
+
|
|
141
|
+
- Allow to use the package with Python 3.14 -- Caution: No security
|
|
142
|
+
audit has been done so far.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
8.0 (2025-01-23)
|
|
146
|
+
----------------
|
|
147
|
+
|
|
148
|
+
Backwards incompatible changes
|
|
149
|
+
++++++++++++++++++++++++++++++
|
|
150
|
+
|
|
151
|
+
- Disallow ``try/except*`` clauses due to a possible sandbox escape and
|
|
152
|
+
probable uselessness of this feature in the context of ``RestrictedPython``.
|
|
153
|
+
In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
|
|
154
|
+
with ``try/except*``). - This feature was introduced into
|
|
155
|
+
``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
|
|
156
|
+
|
|
157
|
+
- Drop support for Python 3.8.
|
|
158
|
+
|
|
159
|
+
Features
|
|
160
|
+
++++++++
|
|
161
|
+
|
|
162
|
+
- Update setuptools version pin.
|
|
163
|
+
(`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
|
|
164
|
+
|
|
165
|
+
|
|
127
166
|
7.4 (2024-10-09)
|
|
128
167
|
----------------
|
|
129
168
|
|
{restrictedpython-7.4 → restrictedpython-8.1a1.dev0}/src/RestrictedPython.egg-info/SOURCES.txt
RENAMED
|
@@ -20,30 +20,9 @@ docs/index.rst
|
|
|
20
20
|
docs/logo.jpg
|
|
21
21
|
docs/make.bat
|
|
22
22
|
docs/requirements.txt
|
|
23
|
-
docs/_build/doctest/output.txt
|
|
24
|
-
docs/_build/html/_images/logo.jpg
|
|
25
|
-
docs/_build/html/_sources/changes.rst.txt
|
|
26
|
-
docs/_build/html/_sources/idea.rst.txt
|
|
27
|
-
docs/_build/html/_sources/index.rst.txt
|
|
28
|
-
docs/_build/html/_sources/contributing/changes_from310to311.rst.txt
|
|
29
|
-
docs/_build/html/_sources/contributing/changes_from311to312.rst.txt
|
|
30
|
-
docs/_build/html/_sources/contributing/changes_from312to313.rst.txt
|
|
31
|
-
docs/_build/html/_sources/contributing/changes_from37to38.rst.txt
|
|
32
|
-
docs/_build/html/_sources/contributing/changes_from38to39.rst.txt
|
|
33
|
-
docs/_build/html/_sources/contributing/changes_from39to310.rst.txt
|
|
34
|
-
docs/_build/html/_sources/contributing/index.rst.txt
|
|
35
|
-
docs/_build/html/_sources/install/index.rst.txt
|
|
36
|
-
docs/_build/html/_sources/roadmap/index.rst.txt
|
|
37
|
-
docs/_build/html/_sources/usage/api.rst.txt
|
|
38
|
-
docs/_build/html/_sources/usage/basic_usage.rst.txt
|
|
39
|
-
docs/_build/html/_sources/usage/framework_usage.rst.txt
|
|
40
|
-
docs/_build/html/_sources/usage/index.rst.txt
|
|
41
|
-
docs/_build/html/_sources/usage/policy.rst.txt
|
|
42
|
-
docs/_build/html/_static/scripts/furo.js.LICENSE.txt
|
|
43
23
|
docs/contributing/changes_from310to311.rst
|
|
44
24
|
docs/contributing/changes_from311to312.rst
|
|
45
25
|
docs/contributing/changes_from312to313.rst
|
|
46
|
-
docs/contributing/changes_from37to38.rst
|
|
47
26
|
docs/contributing/changes_from38to39.rst
|
|
48
27
|
docs/contributing/changes_from39to310.rst
|
|
49
28
|
docs/contributing/index.rst
|
|
@@ -51,7 +30,6 @@ docs/contributing/ast/python3_10.ast
|
|
|
51
30
|
docs/contributing/ast/python3_11.ast
|
|
52
31
|
docs/contributing/ast/python3_12.ast
|
|
53
32
|
docs/contributing/ast/python3_13.ast
|
|
54
|
-
docs/contributing/ast/python3_7.ast
|
|
55
33
|
docs/contributing/ast/python3_8.ast
|
|
56
34
|
docs/contributing/ast/python3_9.ast
|
|
57
35
|
docs/install/index.rst
|
|
@@ -68,19 +68,13 @@ def try_except_star(m):
|
|
|
68
68
|
not IS_PY311_OR_GREATER,
|
|
69
69
|
reason="ExceptionGroup class was added in Python 3.11.",
|
|
70
70
|
)
|
|
71
|
-
def test_RestrictingNodeTransformer__visit_TryStar__1(
|
|
72
|
-
"""It
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
mocker.call('IndentationError'),
|
|
79
|
-
mocker.call('ValueError')
|
|
80
|
-
])
|
|
81
|
-
|
|
82
|
-
with pytest.raises(AssertionError):
|
|
83
|
-
trace.assert_has_calls([mocker.call('RuntimeError')])
|
|
71
|
+
def test_RestrictingNodeTransformer__visit_TryStar__1():
|
|
72
|
+
"""It denies try-except* PEP 654 statements."""
|
|
73
|
+
result = compile_restricted_exec(TRY_EXCEPT_STAR)
|
|
74
|
+
assert result.errors == (
|
|
75
|
+
'Line 3: TryStar statements are not allowed.',
|
|
76
|
+
)
|
|
77
|
+
assert result.code is None
|
|
84
78
|
|
|
85
79
|
|
|
86
80
|
TRY_FINALLY = """
|
|
@@ -5,12 +5,12 @@ minversion = 3.18
|
|
|
5
5
|
envlist =
|
|
6
6
|
release-check
|
|
7
7
|
lint
|
|
8
|
-
py38
|
|
9
8
|
py39
|
|
10
9
|
py310
|
|
11
10
|
py311
|
|
12
11
|
py312
|
|
13
12
|
py313
|
|
13
|
+
py314
|
|
14
14
|
docs
|
|
15
15
|
coverage
|
|
16
16
|
py311-datetime
|
|
@@ -20,11 +20,13 @@ envlist =
|
|
|
20
20
|
usedevelop = true
|
|
21
21
|
package = wheel
|
|
22
22
|
wheel_build_env = .pkg
|
|
23
|
+
pip_pre = py314: true
|
|
23
24
|
deps =
|
|
24
|
-
setuptools
|
|
25
|
+
setuptools == 75.8.2
|
|
25
26
|
datetime: DateTime
|
|
26
27
|
-cconstraints.txt
|
|
27
28
|
pytest-cov
|
|
29
|
+
Sphinx
|
|
28
30
|
setenv =
|
|
29
31
|
COVERAGE_FILE=.coverage.{envname}
|
|
30
32
|
commands =
|
|
@@ -50,7 +52,7 @@ commands =
|
|
|
50
52
|
coverage combine
|
|
51
53
|
coverage html
|
|
52
54
|
coverage report -m --fail-under=100
|
|
53
|
-
depends =
|
|
55
|
+
depends = py39,py310,py311,py311-datetime,py312,py313,py314,coverage
|
|
54
56
|
|
|
55
57
|
[testenv:setuptools-latest]
|
|
56
58
|
basepython = python3
|
|
@@ -65,7 +67,8 @@ description = ensure that the distribution is ready to release
|
|
|
65
67
|
basepython = python3
|
|
66
68
|
skip_install = true
|
|
67
69
|
deps =
|
|
68
|
-
setuptools
|
|
70
|
+
setuptools == 75.8.2
|
|
71
|
+
wheel
|
|
69
72
|
twine
|
|
70
73
|
build
|
|
71
74
|
check-manifest
|
|
@@ -105,6 +108,7 @@ deps =
|
|
|
105
108
|
datetime: DateTime
|
|
106
109
|
-cconstraints.txt
|
|
107
110
|
pytest-cov
|
|
111
|
+
Sphinx
|
|
108
112
|
setenv =
|
|
109
113
|
COVERAGE_FILE=.coverage
|
|
110
114
|
commands =
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
Results of doctest builder run on 2024-10-09 09:56:01
|
|
2
|
-
=====================================================
|
|
3
|
-
|
|
4
|
-
Document: usage/api
|
|
5
|
-
-------------------
|
|
6
|
-
1 items passed all tests:
|
|
7
|
-
13 tests in default
|
|
8
|
-
13 tests in 1 items.
|
|
9
|
-
13 passed and 0 failed.
|
|
10
|
-
Test passed.
|
|
11
|
-
|
|
12
|
-
Document: usage/basic_usage
|
|
13
|
-
---------------------------
|
|
14
|
-
2 items passed all tests:
|
|
15
|
-
6 tests in default
|
|
16
|
-
1 tests in single
|
|
17
|
-
7 tests in 2 items.
|
|
18
|
-
7 passed and 0 failed.
|
|
19
|
-
Test passed.
|
|
20
|
-
|
|
21
|
-
Document: usage/framework_usage
|
|
22
|
-
-------------------------------
|
|
23
|
-
2 items passed all tests:
|
|
24
|
-
1 tests in default
|
|
25
|
-
2 tests in own_policy
|
|
26
|
-
3 tests in 2 items.
|
|
27
|
-
3 passed and 0 failed.
|
|
28
|
-
Test passed.
|
|
29
|
-
|
|
30
|
-
Doctest summary
|
|
31
|
-
===============
|
|
32
|
-
23 tests
|
|
33
|
-
0 failures in tests
|
|
34
|
-
0 failures in setup code
|
|
35
|
-
0 failures in cleanup code
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.. include:: ../CHANGES.rst
|