plone.batching 3.0.1__tar.gz → 3.0.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.
- {plone_batching-3.0.1 → plone_batching-3.0.3}/CHANGES.rst +20 -0
- {plone_batching-3.0.1/src/plone.batching.egg-info → plone_batching-3.0.3}/PKG-INFO +21 -1
- {plone_batching-3.0.1 → plone_batching-3.0.3}/pyproject.toml +6 -3
- plone_batching-3.0.3/src/plone/batching/__init__.py +9 -0
- plone_batching-3.0.3/src/plone/batching/tests/test_security.py +50 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3/src/plone.batching.egg-info}/PKG-INFO +21 -1
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone.batching.egg-info/SOURCES.txt +2 -1
- plone_batching-3.0.1/src/plone/batching/__init__.py +0 -6
- {plone_batching-3.0.1 → plone_batching-3.0.3}/CONTRIBUTING.rst +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/MANIFEST.in +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/README.rst +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/docs/LICENSE.txt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/docs/index.rst +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/setup.cfg +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/setup.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batch.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batch_macros.pt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batching.rst +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batchnavigation.pt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batchnavigation_bootstrap.pt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/browser.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/configure.zcml +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/interfaces.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/tests/__init__.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/tests/test_batching.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/utils.py +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone.batching.egg-info/dependency_links.txt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone.batching.egg-info/requires.txt +0 -0
- {plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone.batching.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,26 @@ Changelog
|
|
|
8
8
|
|
|
9
9
|
.. towncrier release notes start
|
|
10
10
|
|
|
11
|
+
3.0.3 (2026-11-10)
|
|
12
|
+
------------------
|
|
13
|
+
|
|
14
|
+
Bug fixes:
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- Declare only ``Batch`` public in the ``plone.batching`` module instead of opening the whole module to Restricted Python with ``allow_module``.
|
|
18
|
+
[maurits]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
3.0.2 (2026-11-03)
|
|
22
|
+
------------------
|
|
23
|
+
|
|
24
|
+
Internal:
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
- Update configuration files.
|
|
28
|
+
[plone devs]
|
|
29
|
+
|
|
30
|
+
|
|
11
31
|
3.0.1 (2026-08-21)
|
|
12
32
|
------------------
|
|
13
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plone.batching
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: Batching facilities used in Plone
|
|
5
5
|
Author-email: Plone Foundation <plone-developers@lists.sourceforge.net>
|
|
6
6
|
Maintainer-email: Plone Foundation and contributors <plone-developers@lists.sourceforge.net>
|
|
@@ -163,6 +163,26 @@ Changelog
|
|
|
163
163
|
|
|
164
164
|
.. towncrier release notes start
|
|
165
165
|
|
|
166
|
+
3.0.3 (2026-11-10)
|
|
167
|
+
------------------
|
|
168
|
+
|
|
169
|
+
Bug fixes:
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
- Declare only ``Batch`` public in the ``plone.batching`` module instead of opening the whole module to Restricted Python with ``allow_module``.
|
|
173
|
+
[maurits]
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
3.0.2 (2026-11-03)
|
|
177
|
+
------------------
|
|
178
|
+
|
|
179
|
+
Internal:
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
- Update configuration files.
|
|
183
|
+
[plone devs]
|
|
184
|
+
|
|
185
|
+
|
|
166
186
|
3.0.1 (2026-08-21)
|
|
167
187
|
------------------
|
|
168
188
|
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
[build-system]
|
|
5
5
|
requires = ["setuptools>=68.2,<83", "wheel"]
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
# START-MARKER-MANUAL-CONFIG
|
|
10
8
|
# Anything from here until END-MARKER-MANUAL-CONFIG
|
|
11
9
|
# will be kept by plone.meta
|
|
12
10
|
|
|
13
11
|
[project]
|
|
14
12
|
name = "plone.batching"
|
|
15
|
-
version = "3.0.
|
|
13
|
+
version = "3.0.3"
|
|
16
14
|
description = "Batching facilities used in Plone"
|
|
17
15
|
classifiers = [
|
|
18
16
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -186,6 +184,11 @@ pytest-plone = ['pytest', 'zope.pytestlayer', 'plone.testing', 'plone.app.testin
|
|
|
186
184
|
# "gitpython = ['git']",
|
|
187
185
|
# "pygithub = ['github']",
|
|
188
186
|
# ]
|
|
187
|
+
#
|
|
188
|
+
# The Zope and Plone mappings above are included by default. For a package
|
|
189
|
+
# used outside the Zope world they are noise, and can be turned off with:
|
|
190
|
+
# [pyproject]
|
|
191
|
+
# plone_mappings = false
|
|
189
192
|
##
|
|
190
193
|
|
|
191
194
|
[tool.check-manifest]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from AccessControl import allow_class
|
|
2
|
+
from AccessControl import ModuleSecurityInfo
|
|
3
|
+
from plone.batching.batch import Batch
|
|
4
|
+
|
|
5
|
+
# Only declare Batch public. Do not use allow_module here: that would make
|
|
6
|
+
# every name in this module available to restricted code, including
|
|
7
|
+
# imported names like allow_class.
|
|
8
|
+
ModuleSecurityInfo("plone.batching").declarePublic("Batch")
|
|
9
|
+
allow_class(Batch)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from AccessControl import Unauthorized
|
|
2
|
+
from AccessControl.ZopeGuards import guarded_getattr
|
|
3
|
+
from AccessControl.ZopeGuards import guarded_import
|
|
4
|
+
|
|
5
|
+
import unittest
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TestModuleSecurity(unittest.TestCase):
|
|
9
|
+
def test_batch_is_public(self):
|
|
10
|
+
from plone.batching import Batch
|
|
11
|
+
|
|
12
|
+
module = guarded_import("plone.batching", fromlist=["Batch"])
|
|
13
|
+
self.assertIs(guarded_getattr(module, "Batch"), Batch)
|
|
14
|
+
batch = Batch(range(10), 3)
|
|
15
|
+
self.assertEqual(guarded_getattr(batch, "pagesize"), 3)
|
|
16
|
+
|
|
17
|
+
def test_other_names_are_not_public(self):
|
|
18
|
+
import plone.batching
|
|
19
|
+
|
|
20
|
+
# Make sure the submodules are attributes of the package.
|
|
21
|
+
import plone.batching.batch # noqa: F401
|
|
22
|
+
import plone.batching.browser # noqa: F401
|
|
23
|
+
import plone.batching.utils # noqa: F401
|
|
24
|
+
|
|
25
|
+
for name in (
|
|
26
|
+
"allow_class",
|
|
27
|
+
"allow_module",
|
|
28
|
+
"ModuleSecurityInfo",
|
|
29
|
+
"batch",
|
|
30
|
+
"browser",
|
|
31
|
+
"utils",
|
|
32
|
+
):
|
|
33
|
+
if not hasattr(plone.batching, name):
|
|
34
|
+
continue
|
|
35
|
+
with self.subTest(name=name):
|
|
36
|
+
self.assertRaises(Unauthorized, guarded_getattr, plone.batching, name)
|
|
37
|
+
self.assertRaises(
|
|
38
|
+
Unauthorized,
|
|
39
|
+
guarded_import,
|
|
40
|
+
"plone.batching",
|
|
41
|
+
fromlist=[name],
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def test_submodules_not_importable(self):
|
|
45
|
+
# guarded_import may raise the Unauthorized from zExceptions instead.
|
|
46
|
+
for name in ("plone.batching.batch", "plone.batching.utils"):
|
|
47
|
+
with self.subTest(name=name):
|
|
48
|
+
with self.assertRaises(Exception) as cm:
|
|
49
|
+
guarded_import(name)
|
|
50
|
+
self.assertEqual(type(cm.exception).__name__, "Unauthorized")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plone.batching
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: Batching facilities used in Plone
|
|
5
5
|
Author-email: Plone Foundation <plone-developers@lists.sourceforge.net>
|
|
6
6
|
Maintainer-email: Plone Foundation and contributors <plone-developers@lists.sourceforge.net>
|
|
@@ -163,6 +163,26 @@ Changelog
|
|
|
163
163
|
|
|
164
164
|
.. towncrier release notes start
|
|
165
165
|
|
|
166
|
+
3.0.3 (2026-11-10)
|
|
167
|
+
------------------
|
|
168
|
+
|
|
169
|
+
Bug fixes:
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
- Declare only ``Batch`` public in the ``plone.batching`` module instead of opening the whole module to Restricted Python with ``allow_module``.
|
|
173
|
+
[maurits]
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
3.0.2 (2026-11-03)
|
|
177
|
+
------------------
|
|
178
|
+
|
|
179
|
+
Internal:
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
- Update configuration files.
|
|
183
|
+
[plone devs]
|
|
184
|
+
|
|
185
|
+
|
|
166
186
|
3.0.1 (2026-08-21)
|
|
167
187
|
------------------
|
|
168
188
|
|
|
@@ -22,4 +22,5 @@ src/plone/batching/configure.zcml
|
|
|
22
22
|
src/plone/batching/interfaces.py
|
|
23
23
|
src/plone/batching/utils.py
|
|
24
24
|
src/plone/batching/tests/__init__.py
|
|
25
|
-
src/plone/batching/tests/test_batching.py
|
|
25
|
+
src/plone/batching/tests/test_batching.py
|
|
26
|
+
src/plone/batching/tests/test_security.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone/batching/batchnavigation_bootstrap.pt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_batching-3.0.1 → plone_batching-3.0.3}/src/plone.batching.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|