Products.PythonScripts 5.3.1__tar.gz → 5.4__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 (50) hide show
  1. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/.pre-commit-config.yaml +14 -1
  2. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/CHANGES.rst +11 -0
  3. products_pythonscripts-5.4/COPYRIGHT.txt +1 -0
  4. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/PKG-INFO +20 -6
  5. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/README.rst +7 -3
  6. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/pyproject.toml +2 -3
  7. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/Utility.py +11 -2
  8. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/mutate_literals.ps +0 -1
  9. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/subversive_except.ps +0 -1
  10. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/try_except.ps +0 -1
  11. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptAdd.dtml +3 -3
  12. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptEdit.dtml +5 -5
  13. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptProxy.dtml +1 -1
  14. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/PKG-INFO +20 -6
  15. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/tox.ini +0 -1
  16. products_pythonscripts-5.3.1/COPYRIGHT.txt +0 -1
  17. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/CONTRIBUTING.md +0 -0
  18. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/LICENSE.txt +0 -0
  19. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/MANIFEST.in +0 -0
  20. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/buildout.cfg +0 -0
  21. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/setup.cfg +0 -0
  22. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/setup.py +0 -0
  23. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/Extensions/RemotePS.py +0 -0
  24. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/PythonScript.py +0 -0
  25. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/__init__.py +0 -0
  26. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/configure.zcml +0 -0
  27. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/standard.py +0 -0
  28. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/__init__.py +0 -0
  29. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/testBindings.py +0 -0
  30. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/testPythonScript.py +0 -0
  31. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/big_boolean.ps +0 -0
  32. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/boolean_map.ps +0 -0
  33. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/class.__name__.ps +0 -0
  34. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/complete.ps +0 -0
  35. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/complex_print.ps +0 -0
  36. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/fibonacci.ps +0 -0
  37. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/filepath.ps +0 -0
  38. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/for_loop.ps +0 -0
  39. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/global_is_declaration.ps +0 -0
  40. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/ns_bind.ps +0 -0
  41. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/ns_bind_invalid.ps +0 -0
  42. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/simple_print.ps +0 -0
  43. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/tuple_unpack_assignment.ps +0 -0
  44. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/while_loop.ps +0 -0
  45. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/default_content +0 -0
  46. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/SOURCES.txt +0 -0
  47. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/dependency_links.txt +0 -0
  48. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/entry_points.txt +0 -0
  49. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/requires.txt +0 -0
  50. {products_pythonscripts-5.3.1 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/top_level.txt +0 -0
@@ -2,6 +2,15 @@
2
2
  # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
3
3
  minimum_pre_commit_version: '3.6'
4
4
  repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v6.0.0
7
+ hooks:
8
+ - id: check-case-conflict
9
+ - id: check-merge-conflict
10
+ - id: check-toml
11
+ - id: check-yaml
12
+ - id: end-of-file-fixer
13
+ - id: trailing-whitespace
5
14
  - repo: https://github.com/pycqa/isort
6
15
  rev: "8.0.1"
7
16
  hooks:
@@ -15,7 +24,7 @@ repos:
15
24
  rev: v3.21.2
16
25
  hooks:
17
26
  - id: pyupgrade
18
- args: [--py310-plus]
27
+ args: [--py311-plus]
19
28
  - repo: https://github.com/isidentical/teyit
20
29
  rev: 0.4.3
21
30
  hooks:
@@ -27,3 +36,7 @@ repos:
27
36
  - id: flake8
28
37
  additional_dependencies:
29
38
  - flake8-debugger == 4.1.2
39
+ - repo: https://github.com/sphinx-contrib/sphinx-lint
40
+ rev: v1.0.2
41
+ hooks:
42
+ - id: sphinx-lint
@@ -1,6 +1,17 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+
5
+ 5.4 (2026-10-28)
6
+ ----------------
7
+
8
+ - Deprecate BBB shims for ``allow_class`` and ``allow_module``
9
+
10
+ - Add support for Python 3.15.
11
+
12
+ - Drop support for Python 3.10.
13
+
14
+
4
15
  5.3.1 (2026-08-20)
5
16
  ------------------
6
17
 
@@ -0,0 +1 @@
1
+ Zope Foundation and Contributors
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Products.PythonScripts
3
- Version: 5.3.1
3
+ Version: 5.4
4
4
  Summary: Provides support for restricted execution of Python scripts in Zope.
5
5
  Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
6
  Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
@@ -14,14 +14,13 @@ Classifier: Framework :: Zope :: 5
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
21
20
  Classifier: Programming Language :: Python :: 3.14
22
21
  Classifier: Programming Language :: Python :: 3.15
23
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
25
24
  Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE.txt
27
26
  Requires-Dist: AccessControl
@@ -61,7 +60,11 @@ available to them by default. In the course of working with Zope,
61
60
  you will probably wish to make other modules available to script
62
61
  objects.
63
62
 
64
- The Utility.py module in the PythonScripts products provides a
63
+ **Allowing additional modules is risky. Do not do this if untrusted
64
+ users are allowed to add or edit scripts. You may expose your deployment
65
+ to full compromise, including filesystem access on the host!**
66
+
67
+ The AccessControl package products provides a
65
68
  simple way to make modules available for use by script objects
66
69
  on a site-wide basis. Before making a module available to Python
67
70
  scripts, you should carefully consider the potential for abuse
@@ -86,12 +89,12 @@ in the ``__init__.py`` will take effect. Here's how to do it:
86
89
  - In the new directory, create a file named ``__init__.py``.
87
90
 
88
91
  - Edit the ``__init__.py`` file, and add calls to the 'allow_module'
89
- function (located in the Products.PythonScripts.Utility module),
92
+ function (located in the ``AccessControl.SecurityInfo`` module),
90
93
  passing the names of modules to be enabled for use by scripts.
91
94
  For example::
92
95
 
93
96
  # Global module assertions for Python scripts
94
- from Products.PythonScripts.Utility import allow_module
97
+ from AccessControl.SecurityInfo import allow_module
95
98
 
96
99
  allow_module('base64')
97
100
  allow_module('re')
@@ -125,6 +128,17 @@ in the Products directory.
125
128
  Changelog
126
129
  =========
127
130
 
131
+
132
+ 5.4 (2026-10-28)
133
+ ----------------
134
+
135
+ - Deprecate BBB shims for ``allow_class`` and ``allow_module``
136
+
137
+ - Add support for Python 3.15.
138
+
139
+ - Drop support for Python 3.10.
140
+
141
+
128
142
  5.3.1 (2026-08-20)
129
143
  ------------------
130
144
 
@@ -26,7 +26,11 @@ available to them by default. In the course of working with Zope,
26
26
  you will probably wish to make other modules available to script
27
27
  objects.
28
28
 
29
- The Utility.py module in the PythonScripts products provides a
29
+ **Allowing additional modules is risky. Do not do this if untrusted
30
+ users are allowed to add or edit scripts. You may expose your deployment
31
+ to full compromise, including filesystem access on the host!**
32
+
33
+ The AccessControl package products provides a
30
34
  simple way to make modules available for use by script objects
31
35
  on a site-wide basis. Before making a module available to Python
32
36
  scripts, you should carefully consider the potential for abuse
@@ -51,12 +55,12 @@ in the ``__init__.py`` will take effect. Here's how to do it:
51
55
  - In the new directory, create a file named ``__init__.py``.
52
56
 
53
57
  - Edit the ``__init__.py`` file, and add calls to the 'allow_module'
54
- function (located in the Products.PythonScripts.Utility module),
58
+ function (located in the ``AccessControl.SecurityInfo`` module),
55
59
  passing the names of modules to be enabled for use by scripts.
56
60
  For example::
57
61
 
58
62
  # Global module assertions for Python scripts
59
- from Products.PythonScripts.Utility import allow_module
63
+ from AccessControl.SecurityInfo import allow_module
60
64
 
61
65
  allow_module('base64')
62
66
  allow_module('re')
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
9
9
 
10
10
  [project]
11
11
  name = "Products.PythonScripts"
12
- version = "5.3.1"
12
+ version = "5.4"
13
13
  description = "Provides support for restricted execution of Python scripts in Zope."
14
14
  license = "ZPL-2.1"
15
15
  classifiers = [
@@ -20,7 +20,6 @@ classifiers = [
20
20
  "Operating System :: OS Independent",
21
21
  "Programming Language :: Python",
22
22
  "Programming Language :: Python :: 3",
23
- "Programming Language :: Python :: 3.10",
24
23
  "Programming Language :: Python :: 3.11",
25
24
  "Programming Language :: Python :: 3.12",
26
25
  "Programming Language :: Python :: 3.13",
@@ -29,7 +28,7 @@ classifiers = [
29
28
  "Programming Language :: Python :: Implementation :: CPython",
30
29
  ]
31
30
  dynamic = ["readme"]
32
- requires-python = ">=3.10"
31
+ requires-python = ">=3.11"
33
32
  authors = [
34
33
  {name = "Zope Foundation and contributors",email = "zope-dev@zope.dev"},
35
34
  ]
@@ -13,7 +13,16 @@
13
13
  """Utility module for making simple security assertions for
14
14
  Python scripts."""
15
15
 
16
- # These have been relocated, and should be imported from AccessControl
17
-
18
16
  from AccessControl import allow_class # noqa
19
17
  from AccessControl import allow_module # noqa
18
+ from zope.deprecation import deprecated
19
+
20
+
21
+ deprecated('allow_class',
22
+ 'Please import from `AccessControl.SecurityInfo`.'
23
+ 'This backwards-compatibility shim will be removed in version 5.5.')
24
+
25
+
26
+ deprecated('allow_module',
27
+ 'Please import from `AccessControl.SecurityInfo`.'
28
+ 'This backwards-compatibility shim will be removed in version 5.5.')
@@ -6,13 +6,13 @@
6
6
 
7
7
  <p class="form-help">
8
8
  Python Scripts allow you to add functionality to Zope by writing
9
- scripts in the Python programming language that are exposed as callable
10
- Zope objects. You may choose to upload the script from a local file by
9
+ scripts in the Python programming language that are exposed as callable
10
+ Zope objects. You may choose to upload the script from a local file by
11
11
  typing the file name or using the <em>browse</em> button.
12
12
  </p>
13
13
 
14
14
  <form action="manage_addPythonScript" method="post"
15
- enctype="multipart/form-data"
15
+ enctype="multipart/form-data"
16
16
  class="zmi-add zmi-pythonscript">
17
17
 
18
18
  <div class="form-group row">
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </div>
22
22
  </dtml-with>
23
-
23
+
24
24
  <dtml-with getBindingAssignments>
25
25
  <dtml-if getAssignedNamesInOrder>
26
26
  <div class="form-group row ">
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  </dtml-if>
33
33
  </dtml-with>
34
-
34
+
35
35
  <dtml-if errors>
36
36
  <div class="alert alert-danger" role="alert">
37
37
  <pre><dtml-var expr="'\n'.join(errors)" html_quote></pre>
@@ -42,9 +42,9 @@
42
42
  <pre><dtml-var expr="'\n'.join(warnings)" html_quote></pre>
43
43
  </div>
44
44
  </dtml-if>
45
-
45
+
46
46
  <dtml-with keyword_args mapping>
47
- <textarea id="content" data-contenttype="python"
47
+ <textarea id="content" data-contenttype="python"
48
48
  class="form-control zmi-zpt zmi-code col-sm-12"
49
49
  name="body:text" wrap="off" rows="20">&dtml-body;</textarea>
50
50
  </dtml-with>
@@ -74,7 +74,7 @@
74
74
 
75
75
  <div class="input-group" title="Select Local File for Uploading">
76
76
  <div class="custom-file">
77
- <input type="file" name="file" class="custom-file-input" id="file-data" value=""
77
+ <input type="file" name="file" class="custom-file-input" id="file-data" value=""
78
78
  onchange="$('.custom-file label span').html($(this).val().replace(/^.*(\\|\/|\:)/, ''));" />
79
79
  <label class="custom-file-label" for="file-data"><span>Choose file</span></label>
80
80
  </div>
@@ -18,7 +18,7 @@
18
18
  <select id="roles" class="form-control" name="roles:list" size="7" multiple>
19
19
  <dtml-in valid_roles>
20
20
  <dtml-if expr="_vars['sequence-item'] != 'Shared'">
21
- <option
21
+ <option
22
22
  <dtml-if expr="manage_haveProxy(_vars['sequence-item'])">selected="selected"</dtml-if>
23
23
  >&dtml-sequence-item;</option>
24
24
  </dtml-if>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Products.PythonScripts
3
- Version: 5.3.1
3
+ Version: 5.4
4
4
  Summary: Provides support for restricted execution of Python scripts in Zope.
5
5
  Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
6
  Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
@@ -14,14 +14,13 @@ Classifier: Framework :: Zope :: 5
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
21
20
  Classifier: Programming Language :: Python :: 3.14
22
21
  Classifier: Programming Language :: Python :: 3.15
23
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
25
24
  Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE.txt
27
26
  Requires-Dist: AccessControl
@@ -61,7 +60,11 @@ available to them by default. In the course of working with Zope,
61
60
  you will probably wish to make other modules available to script
62
61
  objects.
63
62
 
64
- The Utility.py module in the PythonScripts products provides a
63
+ **Allowing additional modules is risky. Do not do this if untrusted
64
+ users are allowed to add or edit scripts. You may expose your deployment
65
+ to full compromise, including filesystem access on the host!**
66
+
67
+ The AccessControl package products provides a
65
68
  simple way to make modules available for use by script objects
66
69
  on a site-wide basis. Before making a module available to Python
67
70
  scripts, you should carefully consider the potential for abuse
@@ -86,12 +89,12 @@ in the ``__init__.py`` will take effect. Here's how to do it:
86
89
  - In the new directory, create a file named ``__init__.py``.
87
90
 
88
91
  - Edit the ``__init__.py`` file, and add calls to the 'allow_module'
89
- function (located in the Products.PythonScripts.Utility module),
92
+ function (located in the ``AccessControl.SecurityInfo`` module),
90
93
  passing the names of modules to be enabled for use by scripts.
91
94
  For example::
92
95
 
93
96
  # Global module assertions for Python scripts
94
- from Products.PythonScripts.Utility import allow_module
97
+ from AccessControl.SecurityInfo import allow_module
95
98
 
96
99
  allow_module('base64')
97
100
  allow_module('re')
@@ -125,6 +128,17 @@ in the Products directory.
125
128
  Changelog
126
129
  =========
127
130
 
131
+
132
+ 5.4 (2026-10-28)
133
+ ----------------
134
+
135
+ - Deprecate BBB shims for ``allow_class`` and ``allow_module``
136
+
137
+ - Add support for Python 3.15.
138
+
139
+ - Drop support for Python 3.10.
140
+
141
+
128
142
  5.3.1 (2026-08-20)
129
143
  ------------------
130
144
 
@@ -5,7 +5,6 @@ minversion = 3.18
5
5
  envlist =
6
6
  release-check
7
7
  lint
8
- py310
9
8
  py311
10
9
  py312
11
10
  py313
@@ -1 +0,0 @@
1
- Zope Foundation and Contributors