Products.PythonScripts 5.2__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 (53) hide show
  1. products_pythonscripts-5.4/.pre-commit-config.yaml +42 -0
  2. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/CHANGES.rst +25 -0
  3. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/CONTRIBUTING.md +2 -2
  4. products_pythonscripts-5.4/COPYRIGHT.txt +1 -0
  5. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/MANIFEST.in +2 -2
  6. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/PKG-INFO +42 -24
  7. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/README.rst +7 -3
  8. products_pythonscripts-5.4/pyproject.toml +87 -0
  9. products_pythonscripts-5.4/setup.py +19 -0
  10. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/Utility.py +11 -2
  11. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/mutate_literals.ps +0 -1
  12. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/subversive_except.ps +0 -1
  13. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/try_except.ps +0 -1
  14. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptAdd.dtml +3 -3
  15. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptEdit.dtml +5 -5
  16. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/pyScriptProxy.dtml +1 -1
  17. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/PKG-INFO +42 -24
  18. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/requires.txt +1 -1
  19. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/tox.ini +6 -6
  20. products_pythonscripts-5.2/.pre-commit-config.yaml +0 -28
  21. products_pythonscripts-5.2/COPYRIGHT.txt +0 -1
  22. products_pythonscripts-5.2/pyproject.toml +0 -33
  23. products_pythonscripts-5.2/setup.py +0 -66
  24. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/LICENSE.txt +0 -0
  25. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/buildout.cfg +0 -0
  26. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/setup.cfg +0 -0
  27. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/Extensions/RemotePS.py +0 -0
  28. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/PythonScript.py +0 -0
  29. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/__init__.py +0 -0
  30. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/configure.zcml +0 -0
  31. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/standard.py +0 -0
  32. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/__init__.py +0 -0
  33. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/testBindings.py +0 -0
  34. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/testPythonScript.py +0 -0
  35. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/big_boolean.ps +0 -0
  36. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/boolean_map.ps +0 -0
  37. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/class.__name__.ps +0 -0
  38. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/complete.ps +0 -0
  39. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/complex_print.ps +0 -0
  40. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/fibonacci.ps +0 -0
  41. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/filepath.ps +0 -0
  42. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/for_loop.ps +0 -0
  43. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/global_is_declaration.ps +0 -0
  44. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/ns_bind.ps +0 -0
  45. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/ns_bind_invalid.ps +0 -0
  46. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/simple_print.ps +0 -0
  47. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/tuple_unpack_assignment.ps +0 -0
  48. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/tests/tscripts/while_loop.ps +0 -0
  49. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products/PythonScripts/www/default_content +0 -0
  50. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/SOURCES.txt +0 -0
  51. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/dependency_links.txt +0 -0
  52. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/entry_points.txt +0 -0
  53. {products_pythonscripts-5.2 → products_pythonscripts-5.4}/src/Products.PythonScripts.egg-info/top_level.txt +0 -0
@@ -0,0 +1,42 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
3
+ minimum_pre_commit_version: '3.6'
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
14
+ - repo: https://github.com/pycqa/isort
15
+ rev: "8.0.1"
16
+ hooks:
17
+ - id: isort
18
+ - repo: https://github.com/hhatto/autopep8
19
+ rev: "v2.3.2"
20
+ hooks:
21
+ - id: autopep8
22
+ args: [--in-place, --aggressive, --aggressive]
23
+ - repo: https://github.com/asottile/pyupgrade
24
+ rev: v3.21.2
25
+ hooks:
26
+ - id: pyupgrade
27
+ args: [--py311-plus]
28
+ - repo: https://github.com/isidentical/teyit
29
+ rev: 0.4.3
30
+ hooks:
31
+ - id: teyit
32
+ language_version: python3.13
33
+ - repo: https://github.com/PyCQA/flake8
34
+ rev: "7.3.0"
35
+ hooks:
36
+ - id: flake8
37
+ additional_dependencies:
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,31 @@
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
+
15
+ 5.3.1 (2026-08-20)
16
+ ------------------
17
+
18
+ - Switch to PyPI Trusted Publishing.
19
+
20
+
21
+ 5.3 (2026-08-20)
22
+ ----------------
23
+
24
+ - Add support for Python 3.15.
25
+
26
+ - Move package metadata from setup.py to pyproject.toml.
27
+
28
+
4
29
  5.2 (2025-11-20)
5
30
  ----------------
6
31
 
@@ -1,6 +1,6 @@
1
1
  <!--
2
- Generated from:
3
- https://github.com/zopefoundation/meta/tree/master/config/zope-product
2
+ Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
3
+ https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
4
4
  -->
5
5
  # Contributing to zopefoundation projects
6
6
 
@@ -0,0 +1 @@
1
+ Zope Foundation and Contributors
@@ -1,5 +1,5 @@
1
- # Generated from:
2
- # https://github.com/zopefoundation/meta/tree/master/config/zope-product
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
3
3
  include *.md
4
4
  include *.rst
5
5
  include *.txt
@@ -1,28 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Products.PythonScripts
3
- Version: 5.2
3
+ Version: 5.4
4
4
  Summary: Provides support for restricted execution of Python scripts in Zope.
5
- Home-page: https://github.com/zopefoundation/Products.PythonScripts
6
- Author: Zope Foundation and Contributors
7
- Author-email: zope-dev@zope.dev
8
- License: ZPL-2.1
9
- Project-URL: Issue Tracker, https://github.com/zopefoundation/Products.PythonScripts/issues
10
- Project-URL: Sources, https://github.com/zopefoundation/Products.PythonScripts
5
+ Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
+ Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
7
+ License-Expression: ZPL-2.1
8
+ Project-URL: Source, https://github.com/zopefoundation/Products.PythonScripts
9
+ Project-URL: Issues, https://github.com/zopefoundation/Products.PythonScripts/issues
11
10
  Classifier: Development Status :: 6 - Mature
12
11
  Classifier: Environment :: Web Environment
13
12
  Classifier: Framework :: Zope
14
13
  Classifier: Framework :: Zope :: 5
15
- Classifier: License :: OSI Approved :: Zope Public License
16
14
  Classifier: Operating System :: OS Independent
17
15
  Classifier: Programming Language :: Python
18
16
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
22
19
  Classifier: Programming Language :: Python :: 3.13
23
20
  Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
24
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE.txt
27
26
  Requires-Dist: AccessControl
28
27
  Requires-Dist: Acquisition
@@ -30,18 +29,8 @@ Requires-Dist: DateTime
30
29
  Requires-Dist: DocumentTemplate
31
30
  Requires-Dist: RestrictedPython>=4.0b5
32
31
  Requires-Dist: zExceptions
33
- Requires-Dist: Zope>=4.1.2
34
- Dynamic: author
35
- Dynamic: author-email
36
- Dynamic: classifier
37
- Dynamic: description
38
- Dynamic: home-page
39
- Dynamic: license
32
+ Requires-Dist: Zope>=5
40
33
  Dynamic: license-file
41
- Dynamic: project-url
42
- Dynamic: requires-dist
43
- Dynamic: requires-python
44
- Dynamic: summary
45
34
 
46
35
  .. image:: https://github.com/zopefoundation/Products.PythonScripts/actions/workflows/tests.yml/badge.svg
47
36
  :target: https://github.com/zopefoundation/Products.PythonScripts/actions/workflows/tests.yml
@@ -71,7 +60,11 @@ available to them by default. In the course of working with Zope,
71
60
  you will probably wish to make other modules available to script
72
61
  objects.
73
62
 
74
- 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
75
68
  simple way to make modules available for use by script objects
76
69
  on a site-wide basis. Before making a module available to Python
77
70
  scripts, you should carefully consider the potential for abuse
@@ -96,12 +89,12 @@ in the ``__init__.py`` will take effect. Here's how to do it:
96
89
  - In the new directory, create a file named ``__init__.py``.
97
90
 
98
91
  - Edit the ``__init__.py`` file, and add calls to the 'allow_module'
99
- function (located in the Products.PythonScripts.Utility module),
92
+ function (located in the ``AccessControl.SecurityInfo`` module),
100
93
  passing the names of modules to be enabled for use by scripts.
101
94
  For example::
102
95
 
103
96
  # Global module assertions for Python scripts
104
- from Products.PythonScripts.Utility import allow_module
97
+ from AccessControl.SecurityInfo import allow_module
105
98
 
106
99
  allow_module('base64')
107
100
  allow_module('re')
@@ -135,6 +128,31 @@ in the Products directory.
135
128
  Changelog
136
129
  =========
137
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
+
142
+ 5.3.1 (2026-08-20)
143
+ ------------------
144
+
145
+ - Switch to PyPI Trusted Publishing.
146
+
147
+
148
+ 5.3 (2026-08-20)
149
+ ----------------
150
+
151
+ - Add support for Python 3.15.
152
+
153
+ - Move package metadata from setup.py to pyproject.toml.
154
+
155
+
138
156
  5.2 (2025-11-20)
139
157
  ----------------
140
158
 
@@ -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')
@@ -0,0 +1,87 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
3
+ [build-system]
4
+ requires = [
5
+ "setuptools >= 78.1.1,< 82",
6
+ "wheel",
7
+ ]
8
+ build-backend = "setuptools.build_meta"
9
+
10
+ [project]
11
+ name = "Products.PythonScripts"
12
+ version = "5.4"
13
+ description = "Provides support for restricted execution of Python scripts in Zope."
14
+ license = "ZPL-2.1"
15
+ classifiers = [
16
+ "Development Status :: 6 - Mature",
17
+ "Environment :: Web Environment",
18
+ "Framework :: Zope",
19
+ "Framework :: Zope :: 5",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
27
+ "Programming Language :: Python :: 3.15",
28
+ "Programming Language :: Python :: Implementation :: CPython",
29
+ ]
30
+ dynamic = ["readme"]
31
+ requires-python = ">=3.11"
32
+ authors = [
33
+ {name = "Zope Foundation and contributors",email = "zope-dev@zope.dev"},
34
+ ]
35
+ maintainers = [
36
+ {name = "Plone Foundation and contributors",email = "zope-dev@zope.dev"},
37
+ ]
38
+ dependencies = [
39
+ "AccessControl",
40
+ "Acquisition",
41
+ "DateTime",
42
+ "DocumentTemplate",
43
+ "RestrictedPython >= 4.0b5",
44
+ "zExceptions",
45
+ "Zope >= 5",
46
+ ]
47
+
48
+ [project.entry-points."zodbupdate.decode"]
49
+ decodes = "Products.PythonScripts:zodbupdate_decode_dict"
50
+
51
+ [project.urls]
52
+ Source = "https://github.com/zopefoundation/Products.PythonScripts"
53
+ Issues = "https://github.com/zopefoundation/Products.PythonScripts/issues"
54
+
55
+ [pypi]
56
+ trusted-publishing = true
57
+
58
+ [tool.coverage.run]
59
+ branch = true
60
+ source = ["Products.PythonScripts"]
61
+
62
+ [tool.coverage.report]
63
+ fail_under = 83
64
+ precision = 2
65
+ ignore_errors = true
66
+ show_missing = true
67
+ exclude_lines = [
68
+ "pragma: no cover",
69
+ "pragma: nocover",
70
+ "except ImportError:",
71
+ "raise NotImplementedError",
72
+ "if __name__ == '__main__':",
73
+ "self.fail",
74
+ "raise AssertionError",
75
+ "raise unittest.Skip",
76
+ ]
77
+
78
+ [tool.coverage.html]
79
+ directory = "parts/htmlcov"
80
+
81
+ [tool.setuptools.dynamic]
82
+ readme = {file = ["README.rst", "CHANGES.rst"]}
83
+
84
+ [tool.zest-releaser]
85
+ create-wheel = false
86
+ extra-message = ""
87
+ upload-pypi = false
@@ -0,0 +1,19 @@
1
+ ##############################################################################
2
+ #
3
+ # Copyright (c) 2010 Zope Foundation and Contributors.
4
+ # All Rights Reserved.
5
+ #
6
+ # This software is subject to the provisions of the Zope Public License,
7
+ # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
+ # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
+ # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
+ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
+ # FOR A PARTICULAR PURPOSE.
12
+ #
13
+ ##############################################################################
14
+
15
+ from setuptools import setup
16
+
17
+
18
+ # See pyproject.toml for package metadata
19
+ setup()
@@ -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,28 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Products.PythonScripts
3
- Version: 5.2
3
+ Version: 5.4
4
4
  Summary: Provides support for restricted execution of Python scripts in Zope.
5
- Home-page: https://github.com/zopefoundation/Products.PythonScripts
6
- Author: Zope Foundation and Contributors
7
- Author-email: zope-dev@zope.dev
8
- License: ZPL-2.1
9
- Project-URL: Issue Tracker, https://github.com/zopefoundation/Products.PythonScripts/issues
10
- Project-URL: Sources, https://github.com/zopefoundation/Products.PythonScripts
5
+ Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
+ Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
7
+ License-Expression: ZPL-2.1
8
+ Project-URL: Source, https://github.com/zopefoundation/Products.PythonScripts
9
+ Project-URL: Issues, https://github.com/zopefoundation/Products.PythonScripts/issues
11
10
  Classifier: Development Status :: 6 - Mature
12
11
  Classifier: Environment :: Web Environment
13
12
  Classifier: Framework :: Zope
14
13
  Classifier: Framework :: Zope :: 5
15
- Classifier: License :: OSI Approved :: Zope Public License
16
14
  Classifier: Operating System :: OS Independent
17
15
  Classifier: Programming Language :: Python
18
16
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
22
19
  Classifier: Programming Language :: Python :: 3.13
23
20
  Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
24
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/x-rst
26
25
  License-File: LICENSE.txt
27
26
  Requires-Dist: AccessControl
28
27
  Requires-Dist: Acquisition
@@ -30,18 +29,8 @@ Requires-Dist: DateTime
30
29
  Requires-Dist: DocumentTemplate
31
30
  Requires-Dist: RestrictedPython>=4.0b5
32
31
  Requires-Dist: zExceptions
33
- Requires-Dist: Zope>=4.1.2
34
- Dynamic: author
35
- Dynamic: author-email
36
- Dynamic: classifier
37
- Dynamic: description
38
- Dynamic: home-page
39
- Dynamic: license
32
+ Requires-Dist: Zope>=5
40
33
  Dynamic: license-file
41
- Dynamic: project-url
42
- Dynamic: requires-dist
43
- Dynamic: requires-python
44
- Dynamic: summary
45
34
 
46
35
  .. image:: https://github.com/zopefoundation/Products.PythonScripts/actions/workflows/tests.yml/badge.svg
47
36
  :target: https://github.com/zopefoundation/Products.PythonScripts/actions/workflows/tests.yml
@@ -71,7 +60,11 @@ available to them by default. In the course of working with Zope,
71
60
  you will probably wish to make other modules available to script
72
61
  objects.
73
62
 
74
- 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
75
68
  simple way to make modules available for use by script objects
76
69
  on a site-wide basis. Before making a module available to Python
77
70
  scripts, you should carefully consider the potential for abuse
@@ -96,12 +89,12 @@ in the ``__init__.py`` will take effect. Here's how to do it:
96
89
  - In the new directory, create a file named ``__init__.py``.
97
90
 
98
91
  - Edit the ``__init__.py`` file, and add calls to the 'allow_module'
99
- function (located in the Products.PythonScripts.Utility module),
92
+ function (located in the ``AccessControl.SecurityInfo`` module),
100
93
  passing the names of modules to be enabled for use by scripts.
101
94
  For example::
102
95
 
103
96
  # Global module assertions for Python scripts
104
- from Products.PythonScripts.Utility import allow_module
97
+ from AccessControl.SecurityInfo import allow_module
105
98
 
106
99
  allow_module('base64')
107
100
  allow_module('re')
@@ -135,6 +128,31 @@ in the Products directory.
135
128
  Changelog
136
129
  =========
137
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
+
142
+ 5.3.1 (2026-08-20)
143
+ ------------------
144
+
145
+ - Switch to PyPI Trusted Publishing.
146
+
147
+
148
+ 5.3 (2026-08-20)
149
+ ----------------
150
+
151
+ - Add support for Python 3.15.
152
+
153
+ - Move package metadata from setup.py to pyproject.toml.
154
+
155
+
138
156
  5.2 (2025-11-20)
139
157
  ----------------
140
158
 
@@ -4,4 +4,4 @@ DateTime
4
4
  DocumentTemplate
5
5
  RestrictedPython>=4.0b5
6
6
  zExceptions
7
- Zope>=4.1.2
7
+ Zope>=5
@@ -1,21 +1,21 @@
1
- # Generated from:
2
- # https://github.com/zopefoundation/meta/tree/master/config/zope-product
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product
3
3
  [tox]
4
4
  minversion = 3.18
5
5
  envlist =
6
6
  release-check
7
7
  lint
8
- py310
9
8
  py311
10
9
  py312
11
10
  py313
12
11
  py314
12
+ py315
13
13
  coverage
14
14
 
15
15
  [testenv]
16
16
  skip_install = true
17
17
  deps =
18
- setuptools >= 78.1.1,< 81
18
+ setuptools >= 78.1.1,< 82
19
19
  zc.buildout
20
20
  wheel
21
21
  setenv =
@@ -37,12 +37,12 @@ description = ensure that the distribution is ready to release
37
37
  basepython = python3
38
38
  skip_install = true
39
39
  deps =
40
- setuptools >= 78.1.1,< 81
40
+ setuptools >= 78.1.1,< 82
41
41
  wheel
42
42
  twine
43
43
  build
44
44
  check-manifest
45
- check-python-versions >= 0.20.0
45
+ check-python-versions >= 0.24.2
46
46
  wheel
47
47
  commands_pre =
48
48
  commands =
@@ -1,28 +0,0 @@
1
- # Generated from:
2
- # https://github.com/zopefoundation/meta/tree/master/config/zope-product
3
- minimum_pre_commit_version: '3.6'
4
- repos:
5
- - repo: https://github.com/pycqa/isort
6
- rev: "7.0.0"
7
- hooks:
8
- - id: isort
9
- - repo: https://github.com/hhatto/autopep8
10
- rev: "v2.3.2"
11
- hooks:
12
- - id: autopep8
13
- args: [--in-place, --aggressive, --aggressive]
14
- - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.21.0
16
- hooks:
17
- - id: pyupgrade
18
- args: [--py310-plus]
19
- - repo: https://github.com/isidentical/teyit
20
- rev: 0.4.3
21
- hooks:
22
- - id: teyit
23
- - repo: https://github.com/PyCQA/flake8
24
- rev: "7.3.0"
25
- hooks:
26
- - id: flake8
27
- additional_dependencies:
28
- - flake8-debugger == 4.1.2
@@ -1 +0,0 @@
1
- Zope Foundation and Contributors
@@ -1,33 +0,0 @@
1
- #
2
- # Generated from:
3
- # https://github.com/zopefoundation/meta/tree/master/config/zope-product
4
-
5
- [build-system]
6
- requires = [
7
- "setuptools >= 78.1.1,< 81",
8
- "wheel",
9
- ]
10
- build-backend = "setuptools.build_meta"
11
-
12
- [tool.coverage.run]
13
- branch = true
14
- source = ["Products.PythonScripts"]
15
-
16
- [tool.coverage.report]
17
- fail_under = 83
18
- precision = 2
19
- ignore_errors = true
20
- show_missing = true
21
- exclude_lines = [
22
- "pragma: no cover",
23
- "pragma: nocover",
24
- "except ImportError:",
25
- "raise NotImplementedError",
26
- "if __name__ == '__main__':",
27
- "self.fail",
28
- "raise AssertionError",
29
- "raise unittest.Skip",
30
- ]
31
-
32
- [tool.coverage.html]
33
- directory = "parts/htmlcov"
@@ -1,66 +0,0 @@
1
- ##############################################################################
2
- #
3
- # Copyright (c) 2010 Zope Foundation and Contributors.
4
- # All Rights Reserved.
5
- #
6
- # This software is subject to the provisions of the Zope Public License,
7
- # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
- # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
- # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
- # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
- # FOR A PARTICULAR PURPOSE.
12
- #
13
- ##############################################################################
14
-
15
- from setuptools import setup
16
-
17
-
18
- setup(name='Products.PythonScripts',
19
- version='5.2',
20
- url='https://github.com/zopefoundation/Products.PythonScripts',
21
- project_urls={
22
- 'Issue Tracker': ('https://github.com/zopefoundation/'
23
- 'Products.PythonScripts/issues'),
24
- 'Sources': ('https://github.com/zopefoundation/'
25
- 'Products.PythonScripts'),
26
- },
27
- license='ZPL-2.1',
28
- description='Provides support for restricted execution of Python '
29
- 'scripts in Zope.',
30
- author='Zope Foundation and Contributors',
31
- author_email='zope-dev@zope.dev',
32
- long_description=('{}\n{}'.format(open('README.rst').read(),
33
- open('CHANGES.rst').read())),
34
- classifiers=[
35
- 'Development Status :: 6 - Mature',
36
- 'Environment :: Web Environment',
37
- 'Framework :: Zope',
38
- 'Framework :: Zope :: 5',
39
- 'License :: OSI Approved :: Zope Public License',
40
- 'Operating System :: OS Independent',
41
- 'Programming Language :: Python',
42
- 'Programming Language :: Python :: 3',
43
- 'Programming Language :: Python :: 3.10',
44
- 'Programming Language :: Python :: 3.11',
45
- 'Programming Language :: Python :: 3.12',
46
- 'Programming Language :: Python :: 3.13',
47
- 'Programming Language :: Python :: 3.14',
48
- 'Programming Language :: Python :: Implementation :: CPython',
49
- ],
50
- python_requires='>=3.10',
51
- install_requires=[
52
- 'AccessControl',
53
- 'Acquisition',
54
- 'DateTime',
55
- 'DocumentTemplate',
56
- 'RestrictedPython >= 4.0b5',
57
- 'zExceptions',
58
- 'Zope >= 4.1.2',
59
- ],
60
- entry_points={
61
- 'zodbupdate.decode': [
62
- 'decodes = Products.PythonScripts:zodbupdate_decode_dict',
63
- ],
64
- },
65
- include_package_data=True,
66
- )