RestrictedPython 8.2__tar.gz → 8.3__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 (107) hide show
  1. {restrictedpython-8.2 → restrictedpython-8.3}/CHANGES.rst +17 -0
  2. {restrictedpython-8.2 → restrictedpython-8.3}/PKG-INFO +19 -2
  3. {restrictedpython-8.2 → restrictedpython-8.3}/pyproject.toml +6 -2
  4. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/transformer.py +3 -0
  5. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython.egg-info/PKG-INFO +19 -2
  6. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_functiondef.py +18 -0
  7. {restrictedpython-8.2 → restrictedpython-8.3}/tox.ini +2 -0
  8. {restrictedpython-8.2 → restrictedpython-8.3}/.pre-commit-config.yaml +0 -0
  9. {restrictedpython-8.2 → restrictedpython-8.3}/.readthedocs.yaml +0 -0
  10. {restrictedpython-8.2 → restrictedpython-8.3}/CONTRIBUTING.md +0 -0
  11. {restrictedpython-8.2 → restrictedpython-8.3}/COPYRIGHT.txt +0 -0
  12. {restrictedpython-8.2 → restrictedpython-8.3}/LICENSE.txt +0 -0
  13. {restrictedpython-8.2 → restrictedpython-8.3}/MANIFEST.in +0 -0
  14. {restrictedpython-8.2 → restrictedpython-8.3}/README.rst +0 -0
  15. {restrictedpython-8.2 → restrictedpython-8.3}/buildout.cfg +0 -0
  16. {restrictedpython-8.2 → restrictedpython-8.3}/constraints.txt +0 -0
  17. {restrictedpython-8.2 → restrictedpython-8.3}/docs/Makefile +0 -0
  18. {restrictedpython-8.2 → restrictedpython-8.3}/docs/changes.rst +0 -0
  19. {restrictedpython-8.2 → restrictedpython-8.3}/docs/conf.py +0 -0
  20. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_10.ast +0 -0
  21. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_11.ast +0 -0
  22. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_12.ast +0 -0
  23. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_13.ast +0 -0
  24. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_14.ast +0 -0
  25. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_8.ast +0 -0
  26. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/ast/python3_9.ast +0 -0
  27. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/changes_from310to311.rst +0 -0
  28. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/changes_from311to312.rst +0 -0
  29. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/changes_from312to313.rst +0 -0
  30. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/changes_from313to314.rst +0 -0
  31. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/changes_from39to310.rst +0 -0
  32. {restrictedpython-8.2 → restrictedpython-8.3}/docs/contributing/index.rst +0 -0
  33. {restrictedpython-8.2 → restrictedpython-8.3}/docs/idea.rst +0 -0
  34. {restrictedpython-8.2 → restrictedpython-8.3}/docs/index.rst +0 -0
  35. {restrictedpython-8.2 → restrictedpython-8.3}/docs/install/index.rst +0 -0
  36. {restrictedpython-8.2 → restrictedpython-8.3}/docs/logo.jpg +0 -0
  37. {restrictedpython-8.2 → restrictedpython-8.3}/docs/make.bat +0 -0
  38. {restrictedpython-8.2 → restrictedpython-8.3}/docs/requirements.txt +0 -0
  39. {restrictedpython-8.2 → restrictedpython-8.3}/docs/roadmap/index.rst +0 -0
  40. {restrictedpython-8.2 → restrictedpython-8.3}/docs/usage/api.rst +0 -0
  41. {restrictedpython-8.2 → restrictedpython-8.3}/docs/usage/basic_usage.rst +0 -0
  42. {restrictedpython-8.2 → restrictedpython-8.3}/docs/usage/framework_usage.rst +0 -0
  43. {restrictedpython-8.2 → restrictedpython-8.3}/docs/usage/index.rst +0 -0
  44. {restrictedpython-8.2 → restrictedpython-8.3}/docs/usage/policy.rst +0 -0
  45. {restrictedpython-8.2 → restrictedpython-8.3}/setup.cfg +0 -0
  46. {restrictedpython-8.2 → restrictedpython-8.3}/setup.py +0 -0
  47. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/Eval.py +0 -0
  48. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/Guards.py +0 -0
  49. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/Limits.py +0 -0
  50. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/PrintCollector.py +0 -0
  51. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/Utilities.py +0 -0
  52. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/__init__.py +0 -0
  53. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/_compat.py +0 -0
  54. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython/compile.py +0 -0
  55. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython.egg-info/SOURCES.txt +0 -0
  56. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython.egg-info/dependency_links.txt +0 -0
  57. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython.egg-info/requires.txt +0 -0
  58. {restrictedpython-8.2 → restrictedpython-8.3}/src/RestrictedPython.egg-info/top_level.txt +0 -0
  59. {restrictedpython-8.2 → restrictedpython-8.3}/tests/__init__.py +0 -0
  60. {restrictedpython-8.2 → restrictedpython-8.3}/tests/builtins/test_limits.py +0 -0
  61. {restrictedpython-8.2 → restrictedpython-8.3}/tests/builtins/test_utilities.py +0 -0
  62. {restrictedpython-8.2 → restrictedpython-8.3}/tests/helper.py +0 -0
  63. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_Guards.py +0 -0
  64. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_NamedExpr.py +0 -0
  65. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_Utilities.py +0 -0
  66. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_compile.py +0 -0
  67. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_compile_restricted_function.py +0 -0
  68. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_eval.py +0 -0
  69. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_imports.py +0 -0
  70. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_iterating_over_dict_items.py +0 -0
  71. {restrictedpython-8.2 → restrictedpython-8.3}/tests/test_print_function.py +0 -0
  72. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_arithmetic_operators.py +0 -0
  73. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_bit_wise_operators.py +0 -0
  74. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_bool_operators.py +0 -0
  75. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_comparison_operators.py +0 -0
  76. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_identity_operators.py +0 -0
  77. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_logical_operators.py +0 -0
  78. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/operators/test_unary_operators.py +0 -0
  79. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_assert.py +0 -0
  80. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_assign.py +0 -0
  81. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_async.py +0 -0
  82. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_attribute.py +0 -0
  83. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_augassign.py +0 -0
  84. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_base_types.py +0 -0
  85. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_breakpoint.py +0 -0
  86. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_call.py +0 -0
  87. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_classdef.py +0 -0
  88. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_comparators.py +0 -0
  89. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_conditional.py +0 -0
  90. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_dict_comprehension.py +0 -0
  91. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_eval_exec.py +0 -0
  92. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_fstring.py +0 -0
  93. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_gen.py +0 -0
  94. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_generic.py +0 -0
  95. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_global_local.py +0 -0
  96. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_import.py +0 -0
  97. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_inspect.py +0 -0
  98. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_iterator.py +0 -0
  99. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_lambda.py +0 -0
  100. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_loop.py +0 -0
  101. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_name.py +0 -0
  102. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_slice.py +0 -0
  103. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_subscript.py +0 -0
  104. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_try.py +0 -0
  105. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_tstring.py +0 -0
  106. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_with_stmt.py +0 -0
  107. {restrictedpython-8.2 → restrictedpython-8.3}/tests/transformer/test_yield.py +0 -0
@@ -1,6 +1,23 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 8.3 (2026-06-16)
5
+ ----------------
6
+
7
+ - Switch to PyPI Trusted Publishing for the package release process
8
+
9
+ - Also validate positional-only argument names (parameters before ``/``) so
10
+ they cannot start with an underscore, closing a sandbox escape where a
11
+ positional-only parameter could shadow an injected protected name such as
12
+ ``_getattr_``, ``_getitem_``, ``_write_`` or ``_print_``.
13
+
14
+
15
+ 8.3a1.dev0 (2026-05-29)
16
+ -----------------------
17
+
18
+ - Allow to use the package with Python 3.15 -- Caution: No security audit has been done so far.
19
+
20
+
4
21
  8.2 (2026-05-29)
5
22
  ----------------
6
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RestrictedPython
3
- Version: 8.2
3
+ Version: 8.3
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
  Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
6
  Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
23
  Classifier: Topic :: Security
24
- Requires-Python: <3.15,>=3.10
24
+ Requires-Python: <3.16,>=3.10
25
25
  Description-Content-Type: text/x-rst
26
26
  License-File: LICENSE.txt
27
27
  Provides-Extra: test
@@ -123,6 +123,23 @@ the documentation `Contributing page
123
123
  Changes
124
124
  =======
125
125
 
126
+ 8.3 (2026-06-16)
127
+ ----------------
128
+
129
+ - Switch to PyPI Trusted Publishing for the package release process
130
+
131
+ - Also validate positional-only argument names (parameters before ``/``) so
132
+ they cannot start with an underscore, closing a sandbox escape where a
133
+ positional-only parameter could shadow an injected protected name such as
134
+ ``_getattr_``, ``_getitem_``, ``_write_`` or ``_print_``.
135
+
136
+
137
+ 8.3a1.dev0 (2026-05-29)
138
+ -----------------------
139
+
140
+ - Allow to use the package with Python 3.15 -- Caution: No security audit has been done so far.
141
+
142
+
126
143
  8.2 (2026-05-29)
127
144
  ----------------
128
145
 
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
9
9
 
10
10
  [project]
11
11
  name = "RestrictedPython"
12
- version = "8.2"
12
+ version = "8.3"
13
13
  description = "RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment."
14
14
  license = "ZPL-2.1"
15
15
  classifiers = [
@@ -26,7 +26,7 @@ classifiers = [
26
26
  "Topic :: Security",
27
27
  ]
28
28
  dynamic = ["readme"]
29
- requires-python = ">=3.10, <3.15"
29
+ requires-python = ">=3.10, <3.16"
30
30
  authors = [
31
31
  {name = "Zope Foundation and contributors",email = "zope-dev@zope.dev"},
32
32
  ]
@@ -83,3 +83,7 @@ directory = "parts/htmlcov"
83
83
  [tool.setuptools.dynamic]
84
84
  readme = {file = ["README.rst", "CHANGES.rst"]}
85
85
 
86
+
87
+ [tool.zest-releaser]
88
+ create-wheel = false
89
+ upload-pypi = false
@@ -387,6 +387,9 @@ class RestrictingNodeTransformer(ast.NodeTransformer):
387
387
  self.error(node, f'"{name}" is a reserved name.')
388
388
 
389
389
  def check_function_argument_names(self, node):
390
+ for arg in node.args.posonlyargs:
391
+ self.check_name(node, arg.arg)
392
+
390
393
  for arg in node.args.args:
391
394
  self.check_name(node, arg.arg)
392
395
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RestrictedPython
3
- Version: 8.2
3
+ Version: 8.3
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
  Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
6
  Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
23
  Classifier: Topic :: Security
24
- Requires-Python: <3.15,>=3.10
24
+ Requires-Python: <3.16,>=3.10
25
25
  Description-Content-Type: text/x-rst
26
26
  License-File: LICENSE.txt
27
27
  Provides-Extra: test
@@ -123,6 +123,23 @@ the documentation `Contributing page
123
123
  Changes
124
124
  =======
125
125
 
126
+ 8.3 (2026-06-16)
127
+ ----------------
128
+
129
+ - Switch to PyPI Trusted Publishing for the package release process
130
+
131
+ - Also validate positional-only argument names (parameters before ``/``) so
132
+ they cannot start with an underscore, closing a sandbox escape where a
133
+ positional-only parameter could shadow an injected protected name such as
134
+ ``_getattr_``, ``_getitem_``, ``_write_`` or ``_print_``.
135
+
136
+
137
+ 8.3a1.dev0 (2026-05-29)
138
+ -----------------------
139
+
140
+ - Allow to use the package with Python 3.15 -- Caution: No security audit has been done so far.
141
+
142
+
126
143
  8.2 (2026-05-29)
127
144
  ----------------
128
145
 
@@ -29,12 +29,30 @@ def test_RestrictingNodeTransformer__visit_FunctionDef__4():
29
29
  assert result.errors == (functiondef_err_msg,)
30
30
 
31
31
 
32
+ def test_positional_only_arg_with_underscore_is_rejected():
33
+ """It prevents positional-only arguments starting with `_`."""
34
+ result = compile_restricted_exec("def foo(_bad, /): pass")
35
+ assert result.errors == (functiondef_err_msg,)
36
+
37
+
38
+ def test_positional_only_arg_with_default_underscore_is_rejected():
39
+ """It prevents positional-only arguments with an underscore default."""
40
+ result = compile_restricted_exec("def foo(_bad=1, /): pass")
41
+ assert result.errors == (functiondef_err_msg,)
42
+
43
+
32
44
  def test_RestrictingNodeTransformer__visit_FunctionDef__7():
33
45
  """It prevents `_` function arguments together with a single `*`."""
34
46
  result = compile_restricted_exec("def foo(good, *, _bad): pass")
35
47
  assert result.errors == (functiondef_err_msg,)
36
48
 
37
49
 
50
+ def test_positional_only_lambda_arg_with_underscore_is_rejected():
51
+ """It prevents positional-only lambda arguments starting with `_`."""
52
+ result = compile_restricted_exec("f = lambda _bad, /: None")
53
+ assert result.errors == (functiondef_err_msg,)
54
+
55
+
38
56
  BLACKLISTED_FUNC_NAMES_CALL_TEST = """
39
57
  def __init__(test):
40
58
  test
@@ -10,6 +10,7 @@ envlist =
10
10
  py312
11
11
  py313
12
12
  py314
13
+ py315
13
14
  docs
14
15
  coverage
15
16
  py311-datetime
@@ -19,6 +20,7 @@ envlist =
19
20
  usedevelop = true
20
21
  package = wheel
21
22
  wheel_build_env = .pkg
23
+ pip_pre = py315: true
22
24
  deps =
23
25
  setuptools >= 78.1.1,< 82
24
26
  datetime: DateTime
File without changes
File without changes