RestrictedPython 8.0__py3-none-any.whl → 8.1__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.
@@ -6,5 +6,7 @@ _version = sys.version_info
6
6
  IS_PY310_OR_GREATER = _version.major == 3 and _version.minor >= 10
7
7
  IS_PY311_OR_GREATER = _version.major == 3 and _version.minor >= 11
8
8
  IS_PY312_OR_GREATER = _version.major == 3 and _version.minor >= 12
9
+ IS_PY313_OR_GREATER = _version.major == 3 and _version.minor >= 13
10
+ IS_PY314_OR_GREATER = _version.major == 3 and _version.minor >= 14
9
11
 
10
12
  IS_CPYTHON = platform.python_implementation() == 'CPython'
@@ -73,6 +73,7 @@ INSPECT_ATTRIBUTES = frozenset([
73
73
  "f_back",
74
74
  "f_builtins",
75
75
  "f_code",
76
+ "f_generator",
76
77
  "f_globals",
77
78
  # "f_lasti", # int
78
79
  # "f_lineno", # int
@@ -99,6 +100,7 @@ INSPECT_ATTRIBUTES = frozenset([
99
100
  # on generator objects:
100
101
  "gi_frame",
101
102
  # "gi_running", # bool
103
+ # "gi_suspended", # bool
102
104
  "gi_code",
103
105
  "gi_yieldfrom",
104
106
  # on coroutine objects:
@@ -563,6 +565,27 @@ class RestrictingNodeTransformer(ast.NodeTransformer):
563
565
  """Allow f-strings without restrictions."""
564
566
  return self.node_contents_visit(node)
565
567
 
568
+ def visit_TemplateStr(self, node):
569
+ """Template strings are allowed by default.
570
+
571
+ As Template strings are a very basic template mechanism, that needs
572
+ additional rendering logic to be useful, they are not blocked by
573
+ default.
574
+ Those rendering logic would be affected by RestrictedPython as well.
575
+ """
576
+ return self.node_contents_visit(node)
577
+
578
+ def visit_Interpolation(self, node):
579
+ """Interpolations are allowed by default.
580
+
581
+ As Interpolations are part of Template Strings, they are needed
582
+ to be reached in the context of RestrictedPython as Template Strings
583
+ are allowed. As a user has to provide additional rendering logic
584
+ to make use of Template Strings, the security implications of
585
+ Interpolations are limited in the context of RestrictedPython.
586
+ """
587
+ return self.node_contents_visit(node)
588
+
566
589
  def visit_JoinedStr(self, node):
567
590
  """Allow joined string without restrictions."""
568
591
  return self.node_contents_visit(node)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: RestrictedPython
3
- Version: 8.0
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
@@ -20,9 +20,10 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
23
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
25
  Classifier: Topic :: Security
25
- Requires-Python: >=3.9, <3.14
26
+ Requires-Python: >=3.9, <3.15
26
27
  Description-Content-Type: text/x-rst
27
28
  License-File: LICENSE.txt
28
29
  Provides-Extra: test
@@ -31,6 +32,19 @@ Requires-Dist: pytest-mock; extra == "test"
31
32
  Provides-Extra: docs
32
33
  Requires-Dist: Sphinx; extra == "docs"
33
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
34
48
 
35
49
  .. image:: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml/badge.svg
36
50
  :target: https://github.com/zopefoundation/RestrictedPython/actions/workflows/tests.yml
@@ -123,6 +137,19 @@ the documentation `Contributing page
123
137
  Changes
124
138
  =======
125
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
+
126
153
  8.0 (2025-01-23)
127
154
  ----------------
128
155
 
@@ -4,11 +4,11 @@ RestrictedPython/Limits.py,sha256=dORpuly21vSjy8gzNac9IYfIXMMWRVFvqUiKKIeZ3OM,18
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
- RestrictedPython/_compat.py,sha256=2Mew5xHBB0Lg3YfhbFyTdOSt4TQCWnEBGQ1SNFeR8a0,318
7
+ RestrictedPython/_compat.py,sha256=oWDpXfUVHwB36euBXNGs3ctNpbHwKCyNhU1VZAP_U0o,452
8
8
  RestrictedPython/compile.py,sha256=IhcF733t-bkPcvfQ2_NyBeCbSIPtHYxR-GQNNHnaMHM,6727
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,,
9
+ RestrictedPython/transformer.py,sha256=kpWFVLJ1SjBjDzTJhoNfRvnPOHUBy4X6f_XEbyOs7M0,42376
10
+ restrictedpython-8.1.dist-info/licenses/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
11
+ restrictedpython-8.1.dist-info/METADATA,sha256=iKqfMV3IMYc-rwgXSn0HYV0JXrC0R7CZo3w2Lv0ES94,14608
12
+ restrictedpython-8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ restrictedpython-8.1.dist-info/top_level.txt,sha256=E1-3ARWcduVJnQAScms0FgqnBx_PovrzYsNMYuLGwa0,17
14
+ restrictedpython-8.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5