Products.PythonScripts 5.2__py3-none-any.whl → 5.4__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.
- Products/PythonScripts/Utility.py +11 -2
- Products/PythonScripts/tests/tscripts/mutate_literals.ps +0 -1
- Products/PythonScripts/tests/tscripts/subversive_except.ps +0 -1
- Products/PythonScripts/tests/tscripts/try_except.ps +0 -1
- Products/PythonScripts/www/pyScriptAdd.dtml +3 -3
- Products/PythonScripts/www/pyScriptEdit.dtml +5 -5
- Products/PythonScripts/www/pyScriptProxy.dtml +1 -1
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/METADATA +42 -24
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/RECORD +13 -13
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/WHEEL +1 -1
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/entry_points.txt +0 -0
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/licenses/LICENSE.txt +0 -0
- {products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/top_level.txt +0 -0
|
@@ -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.
|
|
3
|
+
Version: 5.4
|
|
4
4
|
Summary: Provides support for restricted execution of Python scripts in Zope.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Project-URL:
|
|
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.
|
|
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>=
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Products/PythonScripts/PythonScript.py,sha256=akLe6wdOQjpwy_AsTH9VPIerEBHV4hOaYCTAACrX3TQ,20940
|
|
2
|
-
Products/PythonScripts/Utility.py,sha256=
|
|
2
|
+
Products/PythonScripts/Utility.py,sha256=IF1zmEDRDZHQqKNh8h0q8v8NZaCKzphzsSZdu8XxME8,1169
|
|
3
3
|
Products/PythonScripts/__init__.py,sha256=hPI8a30soz2sNbeuRTHO-Klib_pXD667gihOax2OHKA,2224
|
|
4
4
|
Products/PythonScripts/configure.zcml,sha256=oEllo95Kz_TbT-o33fkM3K7eJekI9UtYq7VheP3TQ80,222
|
|
5
5
|
Products/PythonScripts/standard.py,sha256=q7Y9HmwoNeep9Ge2TZPIxOHeSJuum0Gws_Gky0x0s74,3741
|
|
@@ -16,21 +16,21 @@ Products/PythonScripts/tests/tscripts/fibonacci.ps,sha256=1CjQrY5lVbPA3JV3I8XqJY
|
|
|
16
16
|
Products/PythonScripts/tests/tscripts/filepath.ps,sha256=DIZQUfmj3zxTeqrdnWVKGvGrp6jPRz7S8SGLu4UnTe8,77
|
|
17
17
|
Products/PythonScripts/tests/tscripts/for_loop.ps,sha256=9VODRKOMuDjH00kk_xwlkBT4Zu4JPAaQyHIt4RywA4s,49
|
|
18
18
|
Products/PythonScripts/tests/tscripts/global_is_declaration.ps,sha256=8pPqJNMbTjJCsoXbY2eqeTrViFbqb68GY4B5sTRaZaQ,43
|
|
19
|
-
Products/PythonScripts/tests/tscripts/mutate_literals.ps,sha256=
|
|
19
|
+
Products/PythonScripts/tests/tscripts/mutate_literals.ps,sha256=7ZAsdMFsFFjrek-8D36UrQ0ygyFtsmOZfNmVA2CnoIk,158
|
|
20
20
|
Products/PythonScripts/tests/tscripts/ns_bind.ps,sha256=m9v6G88JtDH4wlrqW-t_ULvuEXaWJQHUUOe6PUxg2o8,35
|
|
21
21
|
Products/PythonScripts/tests/tscripts/ns_bind_invalid.ps,sha256=tH4Diynu1I_MFUQwV3K2XrzjovlwFQYTvZRp82mBQbo,46
|
|
22
22
|
Products/PythonScripts/tests/tscripts/simple_print.ps,sha256=rG6jEyfuirH_ISeHM2pS-q-ijWw33Ab36t1z8mGAwGk,27
|
|
23
|
-
Products/PythonScripts/tests/tscripts/subversive_except.ps,sha256=
|
|
24
|
-
Products/PythonScripts/tests/tscripts/try_except.ps,sha256=
|
|
23
|
+
Products/PythonScripts/tests/tscripts/subversive_except.ps,sha256=58TTHrgIvUErsrhObpWfh-99df9EvaFEOcwqnnk9oyA,135
|
|
24
|
+
Products/PythonScripts/tests/tscripts/try_except.ps,sha256=_B5ChXw_iJptavss6LAfz6kZ39fU9VTUSesNnfxrT0s,109
|
|
25
25
|
Products/PythonScripts/tests/tscripts/tuple_unpack_assignment.ps,sha256=ndiygHw2TLKoN7Lww-_GWUdQbJsxBd9HpFQd8lvJ9Y4,58
|
|
26
26
|
Products/PythonScripts/tests/tscripts/while_loop.ps,sha256=oka5M0x1cdqkn5KAOctBl0hFOoNf-g5eaCE1m13APYA,43
|
|
27
27
|
Products/PythonScripts/www/default_content,sha256=zW3seGJBcptFXv3jecfcKEslpxCfq4leBSDzJwKtQ8w,465
|
|
28
|
-
Products/PythonScripts/www/pyScriptAdd.dtml,sha256=
|
|
29
|
-
Products/PythonScripts/www/pyScriptEdit.dtml,sha256=
|
|
30
|
-
Products/PythonScripts/www/pyScriptProxy.dtml,sha256=
|
|
31
|
-
products_pythonscripts-5.
|
|
32
|
-
products_pythonscripts-5.
|
|
33
|
-
products_pythonscripts-5.
|
|
34
|
-
products_pythonscripts-5.
|
|
35
|
-
products_pythonscripts-5.
|
|
36
|
-
products_pythonscripts-5.
|
|
28
|
+
Products/PythonScripts/www/pyScriptAdd.dtml,sha256=suC3tltYsGfArFkW5T3x7bTU6Lv2qiuuQkS52Zcamg8,1617
|
|
29
|
+
Products/PythonScripts/www/pyScriptEdit.dtml,sha256=44huxSySGIlbrLjGD5NPqyDMHPZ4tRehI0xng4AIWM4,3343
|
|
30
|
+
Products/PythonScripts/www/pyScriptProxy.dtml,sha256=1pBXK7j0LYyKnFrIywyjPPml5JvqOjsVBMT6QYi3bFs,1146
|
|
31
|
+
products_pythonscripts-5.4.dist-info/licenses/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
|
|
32
|
+
products_pythonscripts-5.4.dist-info/METADATA,sha256=Q3lB3csxhOGDzmLv0RMoZa_igLAA2DSjrSrUjkKvuP8,11310
|
|
33
|
+
products_pythonscripts-5.4.dist-info/WHEEL,sha256=YLJXdYXQ2FQ0Uqn2J-6iEIC-3iOey8lH3xCtvFLkd8Q,91
|
|
34
|
+
products_pythonscripts-5.4.dist-info/entry_points.txt,sha256=bYD9dZ1s4djQ3ga5W8tQz28uFzu1tOOA4knl5p6wNy0,76
|
|
35
|
+
products_pythonscripts-5.4.dist-info/top_level.txt,sha256=UgMr3LVXWHS9vjnxTk8VOZd7xxgBn5T02HOaMRXjjTM,9
|
|
36
|
+
products_pythonscripts-5.4.dist-info/RECORD,,
|
{products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{products_pythonscripts-5.2.dist-info → products_pythonscripts-5.4.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|