RestrictedPython 7.4__py3-none-any.whl → 8.0__py3-none-any.whl

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.
@@ -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
- """Allow `ExceptionGroup` without restrictions."""
1145
- return self.node_contents_visit(node)
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
1
  Metadata-Version: 2.1
2
2
  Name: RestrictedPython
3
- Version: 7.4
3
+ Version: 8.0
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,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,15 +22,15 @@ 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.8, <3.14
25
+ Requires-Python: >=3.9, <3.14
27
26
  Description-Content-Type: text/x-rst
28
27
  License-File: LICENSE.txt
29
- Provides-Extra: docs
30
- Requires-Dist: Sphinx; extra == "docs"
31
- Requires-Dist: furo; extra == "docs"
32
28
  Provides-Extra: test
33
29
  Requires-Dist: pytest; extra == "test"
34
30
  Requires-Dist: pytest-mock; extra == "test"
31
+ Provides-Extra: docs
32
+ Requires-Dist: Sphinx; extra == "docs"
33
+ Requires-Dist: furo; extra == "docs"
35
34
 
36
35
  .. image:: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml/badge.svg
37
36
  :target: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml
@@ -124,6 +123,27 @@ the documentation `Contributing page
124
123
  Changes
125
124
  =======
126
125
 
126
+ 8.0 (2025-01-23)
127
+ ----------------
128
+
129
+ Backwards incompatible changes
130
+ ++++++++++++++++++++++++++++++
131
+
132
+ - Disallow ``try/except*`` clauses due to a possible sandbox escape and
133
+ probable uselessness of this feature in the context of ``RestrictedPython``.
134
+ In addition, remove ``ExceptionGroup`` from ``safe_builtins`` (as useful only
135
+ with ``try/except*``). - This feature was introduced into
136
+ ``RestrictedPython`` in version 6.0 for Python 3.11+. (CVE-2025-22153)
137
+
138
+ - Drop support for Python 3.8.
139
+
140
+ Features
141
+ ++++++++
142
+
143
+ - Update setuptools version pin.
144
+ (`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)
145
+
146
+
127
147
  7.4 (2024-10-09)
128
148
  ----------------
129
149
 
@@ -1,14 +1,14 @@
1
1
  RestrictedPython/Eval.py,sha256=pa79tc-JsT7xfzwg0ceMkxyioIEnFbNHc_PsKUhkkj8,3201
2
- RestrictedPython/Guards.py,sha256=Ls4eJa94nj6z6L65faEBCX8m7dHr3iF4n8-HlFpMniE,8217
2
+ RestrictedPython/Guards.py,sha256=hGLMmqB7SPWwaxHl5elPED6MPCLCWg2nmCVM4_OYaV4,8089
3
3
  RestrictedPython/Limits.py,sha256=dORpuly21vSjy8gzNac9IYfIXMMWRVFvqUiKKIeZ3OM,1866
4
4
  RestrictedPython/PrintCollector.py,sha256=bBCpnUPOuKz1wJDuSgh7wo2aoKfcTJeeT8OYnM-K9F8,1137
5
5
  RestrictedPython/Utilities.py,sha256=u4HUdyjGawaeHyXSakyt4gRT17BZietXnF5WqicujjE,3033
6
6
  RestrictedPython/__init__.py,sha256=qB_s6zDxuXPAGMoKYKBMc-xZ0gTnQ0ZvtY5FxdAG3aM,1862
7
7
  RestrictedPython/_compat.py,sha256=2Mew5xHBB0Lg3YfhbFyTdOSt4TQCWnEBGQ1SNFeR8a0,318
8
8
  RestrictedPython/compile.py,sha256=IhcF733t-bkPcvfQ2_NyBeCbSIPtHYxR-GQNNHnaMHM,6727
9
- RestrictedPython/transformer.py,sha256=qpvsswxFDkVTra48qxQivnAbBoVdmEVLgdDKCwwt2cI,41418
10
- RestrictedPython-7.4.dist-info/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
11
- RestrictedPython-7.4.dist-info/METADATA,sha256=oU8AXsXRUKtaYTnteX0ulTyVZQVM2gQBdXeRDGwKLHg,13448
12
- RestrictedPython-7.4.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
13
- RestrictedPython-7.4.dist-info/top_level.txt,sha256=E1-3ARWcduVJnQAScms0FgqnBx_PovrzYsNMYuLGwa0,17
14
- RestrictedPython-7.4.dist-info/RECORD,,
9
+ RestrictedPython/transformer.py,sha256=UEs-dqbE6r0lGq7JLszVsIXnZTnO_ak2pw8Isyp9l6s,41419
10
+ RestrictedPython-8.0.dist-info/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
11
+ RestrictedPython-8.0.dist-info/METADATA,sha256=MgUWJ-boog0VTEnx4DfwdscAQ9wh8fxfj7wmf6exrPY,14023
12
+ RestrictedPython-8.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
13
+ RestrictedPython-8.0.dist-info/top_level.txt,sha256=E1-3ARWcduVJnQAScms0FgqnBx_PovrzYsNMYuLGwa0,17
14
+ RestrictedPython-8.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.1)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5