RestrictedPython 7.1__py3-none-any.whl → 7.2__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.
@@ -246,6 +246,8 @@ def safer_getattr(object, name, default=None, getattr=getattr):
246
246
  http://lucumr.pocoo.org/2016/12/29/careful-with-str-format/
247
247
 
248
248
  """
249
+ if type(name) is not str:
250
+ raise TypeError('type(name) must be str')
249
251
  if name in ('format', 'format_map') and (
250
252
  isinstance(object, str) or
251
253
  (isinstance(object, type) and issubclass(object, str))):
@@ -593,6 +593,10 @@ class RestrictingNodeTransformer(ast.NodeTransformer):
593
593
  """
594
594
  return self.node_contents_visit(node)
595
595
 
596
+ def visit_Interactive(self, node):
597
+ """Allow single mode without restrictions."""
598
+ return self.node_contents_visit(node)
599
+
596
600
  def visit_List(self, node):
597
601
  """Allow list literals without restrictions."""
598
602
  return self.node_contents_visit(node)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RestrictedPython
3
- Version: 7.1
3
+ Version: 7.2
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
@@ -124,6 +124,16 @@ the documentation `Contributing page
124
124
  Changes
125
125
  =======
126
126
 
127
+ 7.2 (2024-08-02)
128
+ ----------------
129
+
130
+ - Remove unneeded setuptools fossils that may cause installation problems
131
+ with recent setuptools versions.
132
+ - Add support for single mode statements / execution.
133
+ - Fix a potential breakout capability in the provided ``safer_getattr`` method
134
+ that is part of the ``safer_builtins``.
135
+
136
+
127
137
  7.1 (2024-03-14)
128
138
  ----------------
129
139
 
@@ -1,14 +1,14 @@
1
1
  RestrictedPython/Eval.py,sha256=pa79tc-JsT7xfzwg0ceMkxyioIEnFbNHc_PsKUhkkj8,3201
2
- RestrictedPython/Guards.py,sha256=XXupE0TwcWdb6qAsSexWUYEIeT3bVLTdOVvn94eoqs0,7646
2
+ RestrictedPython/Guards.py,sha256=61wKg3bAFmGCyjJMAb5fE7l0He2xOpF5HTM61gSAwW4,7726
3
3
  RestrictedPython/Limits.py,sha256=dORpuly21vSjy8gzNac9IYfIXMMWRVFvqUiKKIeZ3OM,1866
4
4
  RestrictedPython/PrintCollector.py,sha256=bBCpnUPOuKz1wJDuSgh7wo2aoKfcTJeeT8OYnM-K9F8,1137
5
5
  RestrictedPython/Utilities.py,sha256=7R6Op1Oqw9-fSxy_eWVa6ioZPx-SAxa7OolDObTWRkU,2937
6
6
  RestrictedPython/__init__.py,sha256=qB_s6zDxuXPAGMoKYKBMc-xZ0gTnQ0ZvtY5FxdAG3aM,1862
7
7
  RestrictedPython/_compat.py,sha256=nacdAJi4E8GKhkR99_BAxMA0AtK2FQnvrqZbG8hGofc,383
8
8
  RestrictedPython/compile.py,sha256=IhcF733t-bkPcvfQ2_NyBeCbSIPtHYxR-GQNNHnaMHM,6727
9
- RestrictedPython/transformer.py,sha256=AsPDuEN42OrBZBDtDCOFcWssNZrvm8PBGku8IvREXFg,42766
10
- RestrictedPython-7.1.dist-info/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
11
- RestrictedPython-7.1.dist-info/METADATA,sha256=sCrmJOLu50Vs7tsf-NSieDbHaoyUdXc9gjTQeUgBoZw,12241
12
- RestrictedPython-7.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
- RestrictedPython-7.1.dist-info/top_level.txt,sha256=E1-3ARWcduVJnQAScms0FgqnBx_PovrzYsNMYuLGwa0,17
14
- RestrictedPython-7.1.dist-info/RECORD,,
9
+ RestrictedPython/transformer.py,sha256=toPGqFvc9WM1bnh2yIgNZcsz0ySwlSyJXViCSau-19I,42906
10
+ RestrictedPython-7.2.dist-info/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
11
+ RestrictedPython-7.2.dist-info/METADATA,sha256=ZfRIK0nc484O0Aiw-HU1jDySSl3FTZR81a67R9yz1sc,12562
12
+ RestrictedPython-7.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
+ RestrictedPython-7.2.dist-info/top_level.txt,sha256=E1-3ARWcduVJnQAScms0FgqnBx_PovrzYsNMYuLGwa0,17
14
+ RestrictedPython-7.2.dist-info/RECORD,,