RestrictedPython 7.4__tar.gz → 8.1__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.
Files changed (131) hide show
  1. {restrictedpython-7.4 → restrictedpython-8.1}/.pre-commit-config.yaml +5 -5
  2. {restrictedpython-7.4 → restrictedpython-8.1}/CHANGES.rst +34 -0
  3. {restrictedpython-7.4 → restrictedpython-8.1}/CONTRIBUTING.md +1 -1
  4. {restrictedpython-7.4 → restrictedpython-8.1}/PKG-INFO +52 -5
  5. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/doctest/output.txt +8 -8
  6. restrictedpython-8.1/docs/_build/html/_sources/contributing/changes_from313to314.rst.txt +5 -0
  7. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/index.rst.txt +11 -11
  8. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/index.rst.txt +1 -1
  9. {restrictedpython-7.4 → restrictedpython-8.1}/docs/conf.py +3 -3
  10. restrictedpython-8.1/docs/contributing/ast/python3_14.ast +196 -0
  11. restrictedpython-8.1/docs/contributing/changes_from313to314.rst +5 -0
  12. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/index.rst +11 -11
  13. {restrictedpython-7.4 → restrictedpython-8.1}/docs/index.rst +1 -1
  14. {restrictedpython-7.4 → restrictedpython-8.1}/pyproject.toml +15 -3
  15. {restrictedpython-7.4 → restrictedpython-8.1}/setup.py +4 -4
  16. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/Guards.py +0 -4
  17. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/_compat.py +2 -0
  18. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/transformer.py +25 -2
  19. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/PKG-INFO +52 -5
  20. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/SOURCES.txt +4 -3
  21. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_try.py +7 -13
  22. restrictedpython-8.1/tests/transformer/test_tstring.py +91 -0
  23. {restrictedpython-7.4 → restrictedpython-8.1}/tox.ini +8 -4
  24. restrictedpython-7.4/docs/_build/html/_sources/contributing/changes_from37to38.rst.txt +0 -5
  25. restrictedpython-7.4/docs/contributing/ast/python3_7.ast +0 -175
  26. restrictedpython-7.4/docs/contributing/changes_from37to38.rst +0 -5
  27. {restrictedpython-7.4 → restrictedpython-8.1}/.readthedocs.yaml +0 -0
  28. {restrictedpython-7.4 → restrictedpython-8.1}/COPYRIGHT.txt +0 -0
  29. {restrictedpython-7.4 → restrictedpython-8.1}/LICENSE.txt +0 -0
  30. {restrictedpython-7.4 → restrictedpython-8.1}/MANIFEST.in +0 -0
  31. {restrictedpython-7.4 → restrictedpython-8.1}/README.rst +0 -0
  32. {restrictedpython-7.4 → restrictedpython-8.1}/buildout.cfg +0 -0
  33. {restrictedpython-7.4 → restrictedpython-8.1}/constraints.txt +0 -0
  34. {restrictedpython-7.4 → restrictedpython-8.1}/docs/Makefile +0 -0
  35. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_images/logo.jpg +0 -0
  36. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/changes.rst.txt +0 -0
  37. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/changes_from310to311.rst.txt +0 -0
  38. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/changes_from311to312.rst.txt +0 -0
  39. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/changes_from312to313.rst.txt +0 -0
  40. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/changes_from38to39.rst.txt +0 -0
  41. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/contributing/changes_from39to310.rst.txt +0 -0
  42. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/idea.rst.txt +0 -0
  43. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/install/index.rst.txt +0 -0
  44. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/roadmap/index.rst.txt +0 -0
  45. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/usage/api.rst.txt +0 -0
  46. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/usage/basic_usage.rst.txt +0 -0
  47. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/usage/framework_usage.rst.txt +0 -0
  48. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/usage/index.rst.txt +0 -0
  49. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_sources/usage/policy.rst.txt +0 -0
  50. {restrictedpython-7.4 → restrictedpython-8.1}/docs/_build/html/_static/scripts/furo.js.LICENSE.txt +0 -0
  51. {restrictedpython-7.4 → restrictedpython-8.1}/docs/changes.rst +0 -0
  52. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_10.ast +0 -0
  53. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_11.ast +0 -0
  54. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_12.ast +0 -0
  55. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_13.ast +0 -0
  56. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_8.ast +0 -0
  57. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/ast/python3_9.ast +0 -0
  58. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/changes_from310to311.rst +0 -0
  59. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/changes_from311to312.rst +0 -0
  60. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/changes_from312to313.rst +0 -0
  61. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/changes_from38to39.rst +0 -0
  62. {restrictedpython-7.4 → restrictedpython-8.1}/docs/contributing/changes_from39to310.rst +0 -0
  63. {restrictedpython-7.4 → restrictedpython-8.1}/docs/idea.rst +0 -0
  64. {restrictedpython-7.4 → restrictedpython-8.1}/docs/install/index.rst +0 -0
  65. {restrictedpython-7.4 → restrictedpython-8.1}/docs/logo.jpg +0 -0
  66. {restrictedpython-7.4 → restrictedpython-8.1}/docs/make.bat +0 -0
  67. {restrictedpython-7.4 → restrictedpython-8.1}/docs/requirements.txt +0 -0
  68. {restrictedpython-7.4 → restrictedpython-8.1}/docs/roadmap/index.rst +0 -0
  69. {restrictedpython-7.4 → restrictedpython-8.1}/docs/usage/api.rst +0 -0
  70. {restrictedpython-7.4 → restrictedpython-8.1}/docs/usage/basic_usage.rst +0 -0
  71. {restrictedpython-7.4 → restrictedpython-8.1}/docs/usage/framework_usage.rst +0 -0
  72. {restrictedpython-7.4 → restrictedpython-8.1}/docs/usage/index.rst +0 -0
  73. {restrictedpython-7.4 → restrictedpython-8.1}/docs/usage/policy.rst +0 -0
  74. {restrictedpython-7.4 → restrictedpython-8.1}/setup.cfg +0 -0
  75. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/Eval.py +0 -0
  76. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/Limits.py +0 -0
  77. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/PrintCollector.py +0 -0
  78. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/Utilities.py +0 -0
  79. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/__init__.py +0 -0
  80. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython/compile.py +0 -0
  81. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/dependency_links.txt +0 -0
  82. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/not-zip-safe +0 -0
  83. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/requires.txt +0 -0
  84. {restrictedpython-7.4 → restrictedpython-8.1}/src/RestrictedPython.egg-info/top_level.txt +0 -0
  85. {restrictedpython-7.4 → restrictedpython-8.1}/tests/__init__.py +0 -0
  86. {restrictedpython-7.4 → restrictedpython-8.1}/tests/builtins/test_limits.py +0 -0
  87. {restrictedpython-7.4 → restrictedpython-8.1}/tests/builtins/test_utilities.py +0 -0
  88. {restrictedpython-7.4 → restrictedpython-8.1}/tests/helper.py +0 -0
  89. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_Guards.py +0 -0
  90. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_NamedExpr.py +0 -0
  91. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_Utilities.py +0 -0
  92. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_compile.py +0 -0
  93. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_compile_restricted_function.py +0 -0
  94. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_eval.py +0 -0
  95. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_imports.py +0 -0
  96. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_iterating_over_dict_items.py +0 -0
  97. {restrictedpython-7.4 → restrictedpython-8.1}/tests/test_print_function.py +0 -0
  98. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_arithmetic_operators.py +0 -0
  99. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_bit_wise_operators.py +0 -0
  100. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_bool_operators.py +0 -0
  101. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_comparison_operators.py +0 -0
  102. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_identity_operators.py +0 -0
  103. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_logical_operators.py +0 -0
  104. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/operators/test_unary_operators.py +0 -0
  105. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_assert.py +0 -0
  106. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_assign.py +0 -0
  107. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_async.py +0 -0
  108. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_attribute.py +0 -0
  109. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_augassign.py +0 -0
  110. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_base_types.py +0 -0
  111. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_breakpoint.py +0 -0
  112. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_call.py +0 -0
  113. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_classdef.py +0 -0
  114. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_comparators.py +0 -0
  115. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_conditional.py +0 -0
  116. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_dict_comprehension.py +0 -0
  117. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_eval_exec.py +0 -0
  118. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_fstring.py +0 -0
  119. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_functiondef.py +0 -0
  120. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_generic.py +0 -0
  121. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_global_local.py +0 -0
  122. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_import.py +0 -0
  123. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_inspect.py +0 -0
  124. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_iterator.py +0 -0
  125. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_lambda.py +0 -0
  126. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_loop.py +0 -0
  127. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_name.py +0 -0
  128. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_slice.py +0 -0
  129. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_subscript.py +0 -0
  130. {restrictedpython-7.4 → restrictedpython-8.1}/tests/transformer/test_with_stmt.py +0 -0
  131. {restrictedpython-7.4 → restrictedpython-8.1}/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: "5.13.2"
6
+ rev: "7.0.0"
7
7
  hooks:
8
8
  - id: isort
9
9
  - repo: https://github.com/hhatto/autopep8
10
- rev: "v2.3.1"
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.17.0
15
+ rev: v3.21.0
16
16
  hooks:
17
17
  - id: pyupgrade
18
- args: [--py38-plus]
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.1"
24
+ rev: "7.3.0"
25
25
  hooks:
26
26
  - id: flake8
27
27
  additional_dependencies:
@@ -1,6 +1,40 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 8.1 (2025-10-19)
5
+ ----------------
6
+
7
+ - Allow to use the package with Python 3.14 including t-string support.
8
+
9
+
10
+ 8.1a1.dev0 (2025-03-20)
11
+ -----------------------
12
+
13
+ - Allow to use the package with Python 3.14 -- Caution: No security
14
+ audit has been done so far.
15
+
16
+
17
+ 8.0 (2025-01-23)
18
+ ----------------
19
+
20
+ Backwards incompatible changes
21
+ ++++++++++++++++++++++++++++++
22
+
23
+ - Disallow ``try/except*`` clauses due to a possible sandbox escape and
24
+ probable uselessness of this feature in the context of ``RestrictedPython``.
25
+ In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
26
+ with ``try/except*``). - This feature was introduced into
27
+ ``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
28
+
29
+ - Drop support for Python 3.8.
30
+
31
+ Features
32
+ ++++++++
33
+
34
+ - Update setuptools version pin.
35
+ (`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
36
+
37
+
4
38
  7.4 (2024-10-09)
5
39
  ----------------
6
40
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  Generated from:
3
3
  https://github.com/zopefoundation/meta/tree/master/config/pure-python
4
- -->
4
+ -->
5
5
  # Contributing to zopefoundation projects
6
6
 
7
7
  The projects under the zopefoundation GitHub organization are open source and
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: RestrictedPython
3
- Version: 7.4
3
+ Version: 8.1
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 2.1
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,15 +15,15 @@ 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
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
25
  Classifier: Topic :: Security
26
- Requires-Python: >=3.8, <3.14
26
+ Requires-Python: >=3.9, <3.15
27
27
  Description-Content-Type: text/x-rst
28
28
  License-File: LICENSE.txt
29
29
  Provides-Extra: test
@@ -32,6 +32,19 @@ Requires-Dist: pytest-mock; extra == "test"
32
32
  Provides-Extra: docs
33
33
  Requires-Dist: Sphinx; extra == "docs"
34
34
  Requires-Dist: furo; extra == "docs"
35
+ Dynamic: author
36
+ Dynamic: author-email
37
+ Dynamic: classifier
38
+ Dynamic: description
39
+ Dynamic: description-content-type
40
+ Dynamic: home-page
41
+ Dynamic: keywords
42
+ Dynamic: license
43
+ Dynamic: license-file
44
+ Dynamic: project-url
45
+ Dynamic: provides-extra
46
+ Dynamic: requires-python
47
+ Dynamic: summary
35
48
 
36
49
  .. image:: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml/badge.svg
37
50
  :target: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml
@@ -124,6 +137,40 @@ the documentation `Contributing page
124
137
  Changes
125
138
  =======
126
139
 
140
+ 8.1 (2025-10-19)
141
+ ----------------
142
+
143
+ - Allow to use the package with Python 3.14 including t-string support.
144
+
145
+
146
+ 8.1a1.dev0 (2025-03-20)
147
+ -----------------------
148
+
149
+ - Allow to use the package with Python 3.14 -- Caution: No security
150
+ audit has been done so far.
151
+
152
+
153
+ 8.0 (2025-01-23)
154
+ ----------------
155
+
156
+ Backwards incompatible changes
157
+ ++++++++++++++++++++++++++++++
158
+
159
+ - Disallow ``try/except*`` clauses due to a possible sandbox escape and
160
+ probable uselessness of this feature in the context of ``RestrictedPython``.
161
+ In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
162
+ with ``try/except*``). - This feature was introduced into
163
+ ``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
164
+
165
+ - Drop support for Python 3.8.
166
+
167
+ Features
168
+ ++++++++
169
+
170
+ - Update setuptools version pin.
171
+ (`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
172
+
173
+
127
174
  7.4 (2024-10-09)
128
175
  ----------------
129
176
 
@@ -1,30 +1,30 @@
1
- Results of doctest builder run on 2024-10-09 09:56:01
1
+ Results of doctest builder run on 2025-10-19 12:08:37
2
2
  =====================================================
3
3
 
4
4
  Document: usage/api
5
5
  -------------------
6
- 1 items passed all tests:
6
+ 1 item passed all tests:
7
7
  13 tests in default
8
- 13 tests in 1 items.
9
- 13 passed and 0 failed.
8
+ 13 tests in 1 item.
9
+ 13 passed.
10
10
  Test passed.
11
11
 
12
12
  Document: usage/basic_usage
13
13
  ---------------------------
14
14
  2 items passed all tests:
15
15
  6 tests in default
16
- 1 tests in single
16
+ 1 test in single
17
17
  7 tests in 2 items.
18
- 7 passed and 0 failed.
18
+ 7 passed.
19
19
  Test passed.
20
20
 
21
21
  Document: usage/framework_usage
22
22
  -------------------------------
23
23
  2 items passed all tests:
24
- 1 tests in default
24
+ 1 test in default
25
25
  2 tests in own_policy
26
26
  3 tests in 2 items.
27
- 3 passed and 0 failed.
27
+ 3 passed.
28
28
  Test passed.
29
29
 
30
30
  Doctest summary
@@ -0,0 +1,5 @@
1
+ Changes from Python 3.13 to Python 3.14
2
+ ---------------------------------------
3
+
4
+ .. literalinclude:: ast/python3_14.ast
5
+ :diff: ast/python3_13.ast
@@ -98,12 +98,12 @@ 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
105
104
  changes_from311to312
106
105
  changes_from312to313
106
+ changes_from313to314
107
107
 
108
108
  .. _understand:
109
109
 
@@ -236,12 +236,12 @@ Technical Backgrounds - Links to External Documentation
236
236
 
237
237
  * AST Grammar of Python (`Status of Python Versions`_)
238
238
 
239
+ * `Python 3.14 AST`_ (EOL 2030-10)
240
+ * `Python 3.13 AST`_ (EOL 2029-10)
239
241
  * `Python 3.12 AST`_ (EOL 2028-10)
240
242
  * `Python 3.11 AST`_ (EOL 2027-10)
241
243
  * `Python 3.10 AST`_ (EOL 2026-10)
242
244
  * `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
245
 
246
246
  * `AST NodeVistiors Class`_
247
247
  * `AST NodeTransformer Class`_
@@ -259,6 +259,10 @@ Todos
259
259
 
260
260
  .. _`What's new in Python`: https://docs.python.org/3/whatsnew/
261
261
 
262
+ .. _`What's new in Python 3.14`: https://docs.python.org/3.14/whatsnew/3.14.html
263
+
264
+ .. _`What's new in Python 3.13`: https://docs.python.org/3.13/whatsnew/3.13.html
265
+
262
266
  .. _`What's new in Python 3.12`: https://docs.python.org/3.12/whatsnew/3.12.html
263
267
 
264
268
  .. _`What's new in Python 3.11`: https://docs.python.org/3.11/whatsnew/3.11.html
@@ -267,10 +271,6 @@ Todos
267
271
 
268
272
  .. _`What's new in Python 3.9`: https://docs.python.org/3.9/whatsnew/3.9.html
269
273
 
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
274
  .. _`Status of Python Versions`: https://devguide.python.org/versions/
275
275
 
276
276
  .. _`Concept of Immutable Types and Python Example`: https://en.wikipedia.org/wiki/Immutable_object#Python
@@ -285,6 +285,10 @@ Todos
285
285
 
286
286
  .. _`Python 3 AST`: https://docs.python.org/3/library/ast.html#abstract-grammar
287
287
 
288
+ .. _`Python 3.14 AST`: https://docs.python.org/3.14/library/ast.html#abstract-grammar
289
+
290
+ .. _`Python 3.13 AST`: https://docs.python.org/3.13/library/ast.html#abstract-grammar
291
+
288
292
  .. _`Python 3.12 AST`: https://docs.python.org/3.12/library/ast.html#abstract-grammar
289
293
 
290
294
  .. _`Python 3.11 AST`: https://docs.python.org/3.11/library/ast.html#abstract-grammar
@@ -293,10 +297,6 @@ Todos
293
297
 
294
298
  .. _`Python 3.9 AST`: https://docs.python.org/3.9/library/ast.html#abstract-grammar
295
299
 
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
300
  .. _`AST NodeVistiors Class`: https://docs.python.org/3/library/ast.html#ast.NodeVisitor
301
301
 
302
302
  .. _`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.7 up to 3.12.
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
@@ -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.4'
63
+ version = '8.1'
64
64
  # The full version, including alpha/beta/rc tags.
65
- release = '7.4'
65
+ release = '8.1'
66
66
 
67
67
  # The language for content autogenerated by Sphinx. Refer to documentation
68
68
  # for a list of supported languages.
@@ -112,12 +112,12 @@ 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),
119
118
  'python312': ('https://docs.python.org/3.12', None),
120
119
  'python313': ('https://docs.python.org/3.13', None),
120
+ 'python314': ('https://docs.python.org/3.14', None),
121
121
  }
122
122
 
123
123
  # Options for sphinx.ext.todo:
@@ -0,0 +1,196 @@
1
+ -- Python 3.14 AST
2
+ -- ASDL's 4 builtin types are:
3
+ -- identifier, int, string, constant
4
+
5
+ module Python version "3.14"
6
+ {
7
+ mod = Module(stmt* body, type_ignore* type_ignores)
8
+ | Interactive(stmt* body)
9
+ | Expression(expr body)
10
+ | FunctionType(expr* argtypes, expr returns)
11
+
12
+ stmt = FunctionDef(identifier name,
13
+ arguments args,
14
+ stmt* body,
15
+ expr* decorator_list,
16
+ expr? returns,
17
+ string? type_comment,
18
+ type_param* type_params)
19
+ | AsyncFunctionDef(identifier name,
20
+ arguments args,
21
+ stmt* body,
22
+ expr* decorator_list,
23
+ expr? returns,
24
+ string? type_comment,
25
+ type_param* type_params)
26
+
27
+ | ClassDef(identifier name,
28
+ expr* bases,
29
+ keyword* keywords,
30
+ stmt* body,
31
+ expr* decorator_list,
32
+ type_param* type_params)
33
+ | Return(expr? value)
34
+
35
+ | Delete(expr* targets)
36
+ | Assign(expr* targets, expr value, string? type_comment)
37
+ | TypeAlias(expr name, type_param* type_params, expr value)
38
+ | AugAssign(expr target, operator op, expr value)
39
+ -- 'simple' indicates that we annotate simple name without parens
40
+ | AnnAssign(expr target, expr annotation, expr? value, int simple)
41
+
42
+ -- use 'orelse' because else is a keyword in target languages
43
+ | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
44
+ | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
45
+ | While(expr test, stmt* body, stmt* orelse)
46
+ | If(expr test, stmt* body, stmt* orelse)
47
+ | With(withitem* items, stmt* body, string? type_comment)
48
+ | AsyncWith(withitem* items, stmt* body, string? type_comment)
49
+
50
+ | Match(expr subject, match_case* cases)
51
+
52
+ | Raise(expr? exc, expr? cause)
53
+ | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
54
+ | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
55
+ | Assert(expr test, expr? msg)
56
+
57
+ | Import(alias* names)
58
+ | ImportFrom(identifier? module, alias* names, int? level)
59
+
60
+ | Global(identifier* names)
61
+ | Nonlocal(identifier* names)
62
+ | Expr(expr value)
63
+ | Pass
64
+ | Break
65
+ | Continue
66
+
67
+ -- col_offset is the byte offset in the utf8 string the parser uses
68
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
69
+
70
+ -- BoolOp() can use left & right?
71
+ expr = BoolOp(boolop op, expr* values)
72
+ | NamedExpr(expr target, expr value)
73
+ | BinOp(expr left, operator op, expr right)
74
+ | UnaryOp(unaryop op, expr operand)
75
+ | Lambda(arguments args, expr body)
76
+ | IfExp(expr test, expr body, expr orelse)
77
+ | Dict(expr?* keys, expr* values)
78
+ | Set(expr* elts)
79
+ | ListComp(expr elt, comprehension* generators)
80
+ | SetComp(expr elt, comprehension* generators)
81
+ | DictComp(expr key, expr value, comprehension* generators)
82
+ | GeneratorExp(expr elt, comprehension* generators)
83
+ -- the grammar constrains where yield expressions can occur
84
+ | Await(expr value)
85
+ | Yield(expr? value)
86
+ | YieldFrom(expr value)
87
+ -- need sequences for compare to distinguish between
88
+ -- x < 4 < 3 and (x < 4) < 3
89
+ | Compare(expr left, cmpop* ops, expr* comparators)
90
+ | Call(expr func, expr* args, keyword* keywords)
91
+ | FormattedValue(expr value, int conversion, expr? format_spec)
92
+ | Interpolation(expr value, constant str, int conversion, expr? format_spec)
93
+ | JoinedStr(expr* values)
94
+ | TemplateStr(expr* values)
95
+ | Constant(constant value, string? kind)
96
+
97
+ -- the following expression can appear in assignment context
98
+ | Attribute(expr value, identifier attr, expr_context ctx)
99
+ | Subscript(expr value, expr slice, expr_context ctx)
100
+ | Starred(expr value, expr_context ctx)
101
+ | Name(identifier id, expr_context ctx)
102
+ | List(expr* elts, expr_context ctx)
103
+ | Tuple(expr* elts, expr_context ctx)
104
+
105
+ -- can appear only in Subscript
106
+ | Slice(expr? lower, expr? upper, expr? step)
107
+
108
+ -- col_offset is the byte offset in the utf8 string the parser uses
109
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
110
+
111
+ expr_context = Load
112
+ | Store
113
+ | Del
114
+
115
+ boolop = And
116
+ | Or
117
+
118
+ operator = Add
119
+ | Sub
120
+ | Mult
121
+ | MatMult
122
+ | Div
123
+ | Mod
124
+ | Pow
125
+ | LShift
126
+ | RShift
127
+ | BitOr
128
+ | BitXor
129
+ | BitAnd
130
+ | FloorDiv
131
+
132
+ unaryop = Invert
133
+ | Not
134
+ | UAdd
135
+ | USub
136
+
137
+ cmpop = Eq
138
+ | NotEq
139
+ | Lt
140
+ | LtE
141
+ | Gt
142
+ | GtE
143
+ | Is
144
+ | IsNot
145
+ | In
146
+ | NotIn
147
+
148
+ comprehension = (expr target, expr iter, expr* ifs, int is_async)
149
+
150
+ excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
151
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
152
+
153
+ arguments = (arg* posonlyargs,
154
+ arg* args,
155
+ arg? vararg,
156
+ arg* kwonlyargs,
157
+ expr* kw_defaults,
158
+ arg? kwarg,
159
+ expr* defaults)
160
+
161
+ arg = (identifier arg, expr? annotation, string? type_comment)
162
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
163
+
164
+ -- keyword arguments supplied to call (NULL identifier for **kwargs)
165
+ keyword = (identifier? arg, expr value)
166
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
167
+
168
+ -- import name with optional 'as' alias.
169
+ alias = (identifier name, identifier? asname)
170
+ attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
171
+
172
+ withitem = (expr context_expr, expr? optional_vars)
173
+
174
+ match_case = (pattern pattern, expr? guard, stmt* body)
175
+
176
+ pattern = MatchValue(expr value)
177
+ | MatchSingleton(constant value)
178
+ | MatchSequence(pattern* patterns)
179
+ | MatchMapping(expr* keys, pattern* patterns, identifier? rest)
180
+ | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)
181
+
182
+ | MatchStar(identifier? name)
183
+ -- The optional "rest" MatchMapping parameter handles capturing extra mapping keys
184
+
185
+ | MatchAs(pattern? pattern, identifier? name)
186
+ | MatchOr(pattern* patterns)
187
+
188
+ attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
189
+
190
+ type_ignore = TypeIgnore(int lineno, string tag)
191
+
192
+ type_param = TypeVar(identifier name, expr? bound, expr? default_value)
193
+ | ParamSpec(identifier name, expr? default_value)
194
+ | TypeVarTuple(identifier name, expr? default_value)
195
+ attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
196
+ }
@@ -0,0 +1,5 @@
1
+ Changes from Python 3.13 to Python 3.14
2
+ ---------------------------------------
3
+
4
+ .. literalinclude:: ast/python3_14.ast
5
+ :diff: ast/python3_13.ast
@@ -98,12 +98,12 @@ 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
105
104
  changes_from311to312
106
105
  changes_from312to313
106
+ changes_from313to314
107
107
 
108
108
  .. _understand:
109
109
 
@@ -236,12 +236,12 @@ Technical Backgrounds - Links to External Documentation
236
236
 
237
237
  * AST Grammar of Python (`Status of Python Versions`_)
238
238
 
239
+ * `Python 3.14 AST`_ (EOL 2030-10)
240
+ * `Python 3.13 AST`_ (EOL 2029-10)
239
241
  * `Python 3.12 AST`_ (EOL 2028-10)
240
242
  * `Python 3.11 AST`_ (EOL 2027-10)
241
243
  * `Python 3.10 AST`_ (EOL 2026-10)
242
244
  * `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
245
 
246
246
  * `AST NodeVistiors Class`_
247
247
  * `AST NodeTransformer Class`_
@@ -259,6 +259,10 @@ Todos
259
259
 
260
260
  .. _`What's new in Python`: https://docs.python.org/3/whatsnew/
261
261
 
262
+ .. _`What's new in Python 3.14`: https://docs.python.org/3.14/whatsnew/3.14.html
263
+
264
+ .. _`What's new in Python 3.13`: https://docs.python.org/3.13/whatsnew/3.13.html
265
+
262
266
  .. _`What's new in Python 3.12`: https://docs.python.org/3.12/whatsnew/3.12.html
263
267
 
264
268
  .. _`What's new in Python 3.11`: https://docs.python.org/3.11/whatsnew/3.11.html
@@ -267,10 +271,6 @@ Todos
267
271
 
268
272
  .. _`What's new in Python 3.9`: https://docs.python.org/3.9/whatsnew/3.9.html
269
273
 
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
274
  .. _`Status of Python Versions`: https://devguide.python.org/versions/
275
275
 
276
276
  .. _`Concept of Immutable Types and Python Example`: https://en.wikipedia.org/wiki/Immutable_object#Python
@@ -285,6 +285,10 @@ Todos
285
285
 
286
286
  .. _`Python 3 AST`: https://docs.python.org/3/library/ast.html#abstract-grammar
287
287
 
288
+ .. _`Python 3.14 AST`: https://docs.python.org/3.14/library/ast.html#abstract-grammar
289
+
290
+ .. _`Python 3.13 AST`: https://docs.python.org/3.13/library/ast.html#abstract-grammar
291
+
288
292
  .. _`Python 3.12 AST`: https://docs.python.org/3.12/library/ast.html#abstract-grammar
289
293
 
290
294
  .. _`Python 3.11 AST`: https://docs.python.org/3.11/library/ast.html#abstract-grammar
@@ -293,10 +297,6 @@ Todos
293
297
 
294
298
  .. _`Python 3.9 AST`: https://docs.python.org/3.9/library/ast.html#abstract-grammar
295
299
 
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
300
  .. _`AST NodeVistiors Class`: https://docs.python.org/3/library/ast.html#ast.NodeVisitor
301
301
 
302
302
  .. _`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.7 up to 3.12.
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 = ["setuptools<74"]
6
+ requires = [
7
+ "setuptools >= 78.1.1,< 81",
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.9
17
+ fail_under = 97.2
15
18
  precision = 2
16
19
  ignore_errors = true
17
20
  show_missing = true
18
- exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
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"