AccessControl 7.3__tar.gz → 7.5__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 (91) hide show
  1. {accesscontrol-7.3 → accesscontrol-7.5}/.manylinux-install.sh +12 -5
  2. {accesscontrol-7.3 → accesscontrol-7.5}/.manylinux.sh +2 -2
  3. {accesscontrol-7.3 → accesscontrol-7.5}/.pre-commit-config.yaml +5 -4
  4. {accesscontrol-7.3 → accesscontrol-7.5}/CHANGES.rst +26 -0
  5. {accesscontrol-7.3 → accesscontrol-7.5}/CONTRIBUTING.md +2 -2
  6. {accesscontrol-7.3 → accesscontrol-7.5}/MANIFEST.in +2 -2
  7. accesscontrol-7.5/PKG-INFO +440 -0
  8. {accesscontrol-7.3 → accesscontrol-7.5}/pyproject.toml +15 -6
  9. {accesscontrol-7.3 → accesscontrol-7.5}/setup.cfg +0 -3
  10. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/ImplPython.py +18 -6
  11. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/cAccessControl.c +79 -0
  12. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testZopeGuards.py +57 -0
  13. accesscontrol-7.5/src/AccessControl.egg-info/PKG-INFO +440 -0
  14. {accesscontrol-7.3 → accesscontrol-7.5}/tox.ini +6 -4
  15. accesscontrol-7.3/PKG-INFO +0 -68
  16. accesscontrol-7.3/src/AccessControl.egg-info/PKG-INFO +0 -68
  17. {accesscontrol-7.3 → accesscontrol-7.5}/COPYRIGHT.txt +0 -0
  18. {accesscontrol-7.3 → accesscontrol-7.5}/HISTORY.rst +0 -0
  19. {accesscontrol-7.3 → accesscontrol-7.5}/LICENSE.txt +0 -0
  20. {accesscontrol-7.3 → accesscontrol-7.5}/README.rst +0 -0
  21. {accesscontrol-7.3 → accesscontrol-7.5}/buildout.cfg +0 -0
  22. {accesscontrol-7.3 → accesscontrol-7.5}/docs/AccessControl.rst +0 -0
  23. {accesscontrol-7.3 → accesscontrol-7.5}/docs/requestmethod.rst +0 -0
  24. {accesscontrol-7.3 → accesscontrol-7.5}/include/Acquisition/Acquisition.h +0 -0
  25. {accesscontrol-7.3 → accesscontrol-7.5}/include/ExtensionClass/ExtensionClass.h +0 -0
  26. {accesscontrol-7.3 → accesscontrol-7.5}/include/ExtensionClass/_compat.h +0 -0
  27. {accesscontrol-7.3 → accesscontrol-7.5}/setup.py +0 -0
  28. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/AuthEncoding.py +0 -0
  29. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/ImplC.py +0 -0
  30. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/Implementation.py +0 -0
  31. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/Owned.py +0 -0
  32. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/Permission.py +0 -0
  33. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/PermissionMapping.py +0 -0
  34. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/PermissionRole.py +0 -0
  35. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/Permissions.py +0 -0
  36. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/Role.py +0 -0
  37. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/SecurityInfo.py +0 -0
  38. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/SecurityManagement.py +0 -0
  39. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/SecurityManager.py +0 -0
  40. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/SimpleObjectPolicies.py +0 -0
  41. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/SpecialUsers.py +0 -0
  42. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/User.py +0 -0
  43. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/ZopeGuards.py +0 -0
  44. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/ZopeSecurityPolicy.py +0 -0
  45. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/__init__.py +0 -0
  46. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/_compat.h +0 -0
  47. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/class_init.py +0 -0
  48. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/configure.zcml +0 -0
  49. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/interfaces.py +0 -0
  50. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/logger_wrapper.py +0 -0
  51. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/meta.zcml +0 -0
  52. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/metaconfigure.py +0 -0
  53. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/owner.py +0 -0
  54. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/permissions.zcml +0 -0
  55. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/requestmethod.py +0 -0
  56. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/rolemanager.py +0 -0
  57. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/safe_formatter.py +0 -0
  58. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/security.py +0 -0
  59. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tainted.py +0 -0
  60. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/__init__.py +0 -0
  61. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/actual_python.py +0 -0
  62. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/mixed_module/__init__.py +0 -0
  63. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/mixed_module/submodule/__init__.py +0 -0
  64. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/private_module/__init__.py +0 -0
  65. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/private_module/submodule/__init__.py +0 -0
  66. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/public_module/__init__.py +0 -0
  67. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/public_module/submodule/__init__.py +0 -0
  68. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testClassSecurityInfo.py +0 -0
  69. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testImplementation.py +0 -0
  70. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testModuleSecurity.py +0 -0
  71. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testPermissionMapping.py +0 -0
  72. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testPermissionRole.py +0 -0
  73. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testSecurityManager.py +0 -0
  74. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testZCML.py +0 -0
  75. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/testZopeSecurityPolicy.py +0 -0
  76. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_owner.py +0 -0
  77. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_requestmethod.py +0 -0
  78. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_rolemanager.py +0 -0
  79. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_safe_formatter.py +0 -0
  80. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_safeiter.py +0 -0
  81. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_tainted.py +0 -0
  82. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_userfolder.py +0 -0
  83. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/tests/test_users.py +0 -0
  84. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/unauthorized.py +0 -0
  85. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/userfolder.py +0 -0
  86. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl/users.py +0 -0
  87. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl.egg-info/SOURCES.txt +0 -0
  88. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl.egg-info/dependency_links.txt +0 -0
  89. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl.egg-info/entry_points.txt +0 -0
  90. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl.egg-info/requires.txt +0 -0
  91. {accesscontrol-7.3 → accesscontrol-7.5}/src/AccessControl.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Generated from:
3
- # https://github.com/zopefoundation/meta/tree/master/config/c-code
2
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
3
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
4
4
 
5
5
  set -e -x
6
6
 
@@ -33,6 +33,7 @@ tox_env_map() {
33
33
  *"cp312"*) echo 'py312';;
34
34
  *"cp313"*) echo 'py313';;
35
35
  *"cp314"*) echo 'py314';;
36
+ *"cp315"*) echo 'py315';;
36
37
  *) echo 'py';;
37
38
  esac
38
39
  }
@@ -44,9 +45,15 @@ for PYBIN in /opt/python/*/bin; do
44
45
  [[ "${PYBIN}" == *"cp311/"* ]] || \
45
46
  [[ "${PYBIN}" == *"cp312/"* ]] || \
46
47
  [[ "${PYBIN}" == *"cp313/"* ]] || \
47
- [[ "${PYBIN}" == *"cp314/"* ]] ; then
48
- "${PYBIN}/pip" install -e /io/
49
- "${PYBIN}/pip" wheel /io/ -w wheelhouse/
48
+ [[ "${PYBIN}" == *"cp314/"* ]] || \
49
+ [[ "${PYBIN}" == *"cp315/"* ]] ; then
50
+ if [[ "${PYBIN}" == *"cp315/"* ]] ; then
51
+ "${PYBIN}/pip" install --pre -e /io/
52
+ "${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
53
+ else
54
+ "${PYBIN}/pip" install -e /io/
55
+ "${PYBIN}/pip" wheel /io/ -w wheelhouse/
56
+ fi
50
57
  if [ `uname -m` == 'aarch64' ]; then
51
58
  cd /io/
52
59
  ${PYBIN}/pip install tox
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Generated from:
3
- # https://github.com/zopefoundation/meta/tree/master/config/c-code
2
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
3
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
4
4
 
5
5
  set -e -x
6
6
 
@@ -1,9 +1,9 @@
1
- # Generated from:
2
- # https://github.com/zopefoundation/meta/tree/master/config/c-code
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
3
3
  minimum_pre_commit_version: '3.6'
4
4
  repos:
5
5
  - repo: https://github.com/pycqa/isort
6
- rev: "7.0.0"
6
+ rev: "8.0.1"
7
7
  hooks:
8
8
  - id: isort
9
9
  - repo: https://github.com/hhatto/autopep8
@@ -12,7 +12,7 @@ repos:
12
12
  - id: autopep8
13
13
  args: [--in-place, --aggressive, --aggressive]
14
14
  - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.21.0
15
+ rev: v3.21.2
16
16
  hooks:
17
17
  - id: pyupgrade
18
18
  args: [--py310-plus]
@@ -20,6 +20,7 @@ repos:
20
20
  rev: 0.4.3
21
21
  hooks:
22
22
  - id: teyit
23
+ language_version: python3.13
23
24
  - repo: https://github.com/PyCQA/flake8
24
25
  rev: "7.3.0"
25
26
  hooks:
@@ -4,6 +4,32 @@ Change log
4
4
  For changes before version 3.0, see ``HISTORY.rst``.
5
5
 
6
6
 
7
+ 7.5 (2026-08-20)
8
+ ----------------
9
+
10
+ - Add final support for Python 3.15.
11
+
12
+ - Switch to PyPI Trusted Publishing.
13
+
14
+
15
+ 7.4 (2026-07-13)
16
+ ----------------
17
+
18
+ - Fix a parity defect between the Python and C implementations of
19
+ ``guarded_getattr``: the pure-Python implementation keyed the container
20
+ assertion on ``type(value.__self__)`` instead of ``type(inst)``, so under
21
+ ``PURE_PYTHON`` a bound method of an allow-listed simple type (e.g.
22
+ ``tuple``/``bytes``/``range``) was returned without calling ``validate()``.
23
+ The Python implementation now keys on ``type(inst)``, matching the C
24
+ implementation, and a regression test guards the behaviour.
25
+
26
+ - Add preliminary support for Python 3.15 as of 3.15b1.
27
+
28
+ - Add support for automatically building and publishing Windows/ARM64 wheels.
29
+
30
+ - Add support for automatically building and publishing source distributions.
31
+
32
+
7
33
  7.3 (2025-11-16)
8
34
  ----------------
9
35
 
@@ -1,6 +1,6 @@
1
1
  <!--
2
- Generated from:
3
- https://github.com/zopefoundation/meta/tree/master/config/c-code
2
+ Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
3
+ https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
4
4
  -->
5
5
  # Contributing to zopefoundation projects
6
6
 
@@ -1,5 +1,5 @@
1
- # Generated from:
2
- # https://github.com/zopefoundation/meta/tree/master/config/c-code
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
3
3
  include *.md
4
4
  include *.rst
5
5
  include *.txt
@@ -0,0 +1,440 @@
1
+ Metadata-Version: 2.4
2
+ Name: AccessControl
3
+ Version: 7.5
4
+ Summary: Security framework for Zope
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: Issues, https://github.com/zopefoundation/AccessControl/issues
9
+ Project-URL: Source, https://github.com/zopefoundation/AccessControl
10
+ Project-URL: Changelog, https://github.com/zopefoundation/AccessControl/blob/master/CHANGES.rst
11
+ Keywords: security,access,authorization
12
+ Classifier: Development Status :: 6 - Mature
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Framework :: Zope
15
+ Classifier: Framework :: Zope :: 5
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: 3.15
26
+ Classifier: Programming Language :: Python :: Implementation :: CPython
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/x-rst
29
+ License-File: LICENSE.txt
30
+ Requires-Dist: Acquisition
31
+ Requires-Dist: AuthEncoding
32
+ Requires-Dist: BTrees
33
+ Requires-Dist: DateTime
34
+ Requires-Dist: ExtensionClass
35
+ Requires-Dist: Persistence
36
+ Requires-Dist: RestrictedPython
37
+ Requires-Dist: transaction
38
+ Requires-Dist: zExceptions
39
+ Requires-Dist: zope.component
40
+ Requires-Dist: zope.configuration
41
+ Requires-Dist: zope.deferredimport
42
+ Requires-Dist: zope.interface
43
+ Requires-Dist: zope.publisher
44
+ Requires-Dist: zope.schema
45
+ Requires-Dist: zope.security
46
+ Requires-Dist: zope.testing
47
+ Provides-Extra: test
48
+ Requires-Dist: zope.testrunner>=6.4; extra == "test"
49
+ Dynamic: license-file
50
+
51
+ .. image:: https://github.com/zopefoundation/AccessControl/actions/workflows/tests.yml/badge.svg
52
+ :target: https://github.com/zopefoundation/AccessControl/actions/workflows/tests.yml
53
+
54
+ .. image:: https://coveralls.io/repos/github/zopefoundation/AccessControl/badge.svg?branch=master
55
+ :target: https://coveralls.io/github/zopefoundation/AccessControl?branch=master
56
+
57
+ .. image:: https://img.shields.io/pypi/v/AccessControl.svg
58
+ :target: https://pypi.org/project/AccessControl/
59
+ :alt: Current version on PyPI
60
+
61
+ .. image:: https://img.shields.io/pypi/pyversions/AccessControl.svg
62
+ :target: https://pypi.org/project/AccessControl/
63
+ :alt: Supported Python versions
64
+
65
+
66
+ AccessControl
67
+ =============
68
+
69
+ AccessControl provides a general security framework for use in Zope.
70
+
71
+ Change log
72
+ ==========
73
+
74
+ For changes before version 3.0, see ``HISTORY.rst``.
75
+
76
+
77
+ 7.5 (2026-08-20)
78
+ ----------------
79
+
80
+ - Add final support for Python 3.15.
81
+
82
+ - Switch to PyPI Trusted Publishing.
83
+
84
+
85
+ 7.4 (2026-07-13)
86
+ ----------------
87
+
88
+ - Fix a parity defect between the Python and C implementations of
89
+ ``guarded_getattr``: the pure-Python implementation keyed the container
90
+ assertion on ``type(value.__self__)`` instead of ``type(inst)``, so under
91
+ ``PURE_PYTHON`` a bound method of an allow-listed simple type (e.g.
92
+ ``tuple``/``bytes``/``range``) was returned without calling ``validate()``.
93
+ The Python implementation now keys on ``type(inst)``, matching the C
94
+ implementation, and a regression test guards the behaviour.
95
+
96
+ - Add preliminary support for Python 3.15 as of 3.15b1.
97
+
98
+ - Add support for automatically building and publishing Windows/ARM64 wheels.
99
+
100
+ - Add support for automatically building and publishing source distributions.
101
+
102
+
103
+ 7.3 (2025-11-16)
104
+ ----------------
105
+
106
+ - Move all supported package metadata into ``pyproject.toml``.
107
+
108
+ - Add support for Python 3.14.
109
+
110
+ - Drop support for Python 3.8 and 3.9.
111
+
112
+
113
+ 7.2 (2024-11-03)
114
+ ----------------
115
+
116
+ - Prevent untrusted access to ``AccessControl.userfolder.UserFolder.data``
117
+ (fixes `GHSA-g5vw-3h65-2q3v <https://github.com/zopefoundation/AccessControl/security/advisories/GHSA-g5vw-3h65-2q3v>`_).
118
+
119
+
120
+ 7.1 (2024-10-10)
121
+ ----------------
122
+
123
+ - Add final support for Python 3.13.
124
+
125
+ - Respect ``PURE_PYTHON`` environment variable set to ``0`` when running tests.
126
+
127
+ - Let the roles access in ``rolesForPermissionOn`` interpret ``AttributeError``
128
+ and ``Unauthorized`` as "no roles definition for this permission at this
129
+ object" and report any other exception (for the Python and C implementation).
130
+ We have to treat ``Unauthorized`` like ``AttributeError`` to support
131
+ ``Shared.DC.Scripts.Bindings.UnauthorizedBinding`` which raises
132
+ ``Unauthorized`` for any access.
133
+
134
+
135
+ 7.0 (2024-05-30)
136
+ ----------------
137
+
138
+ - Add preliminary support for Python 3.13 as of 3.13b1.
139
+
140
+ - Remove support for Python 3.7.
141
+
142
+ - Build Windows wheels on GHA.
143
+
144
+ - Make dict views (`.keys()`, `.items()` and `.values()`) behave like their
145
+ unrestricted versions.
146
+ (`#147 <https://github.com/zopefoundation/AccessControl/pull/147>`_)
147
+
148
+ - Make `.items()` validate each keys and values, like `.keys()` and
149
+ `.values()` do.
150
+
151
+ - Fix build errors on recent macOS versions.
152
+
153
+
154
+ 6.3 (2023-11-20)
155
+ ----------------
156
+
157
+ - Add support for Python 3.12.
158
+
159
+
160
+ 6.2 (2023-09-04)
161
+ ----------------
162
+
163
+ - Fix information disclosure through ``str.format_map``.
164
+ (CVE-2023-41050)
165
+
166
+
167
+ 6.1 (2023-05-22)
168
+ ----------------
169
+ - Update C header files for ``ExtensionClass`` and ``Acquisition``
170
+ from the original packages where needed.
171
+ (`#140 <https://github.com/zopefoundation/AccessControl/issues/140>`_)
172
+
173
+ - Add preliminary support for Python 3.12a5.
174
+
175
+
176
+ 6.0 (2023-01-12)
177
+ ----------------
178
+
179
+ - Build Linux binary wheels for Python 3.11
180
+
181
+ - Drop support for Python 2.7, 3.5, 3.6.
182
+
183
+
184
+ 5.7 (2022-11-17)
185
+ ----------------
186
+
187
+ - Add support for building arm64 wheels on macOS.
188
+
189
+
190
+ 5.6 (2022-11-03)
191
+ ----------------
192
+
193
+ - Add support for final Python 3.11 release.
194
+
195
+
196
+ 5.5 (2022-10-10)
197
+ ----------------
198
+
199
+ - Switch from ``-Ofast`` to ``-O3`` when compiling code for Linux wheels.
200
+ (`#133 <https://github.com/zopefoundation/AccessControl/pull/133>`_)
201
+
202
+ - Add support for Python 3.11 (as of 3.11.0rc2).
203
+
204
+
205
+ 5.4 (2022-08-26)
206
+ ----------------
207
+
208
+ - Add support for Python 3.11 (as of 3.11.0b5).
209
+
210
+ - Support ``default`` argument in ``next`` built-in function.
211
+ (`#131 <https://github.com/zopefoundation/AccessControl/pull/131>`_)
212
+
213
+
214
+ 5.3.1 (2022-03-29)
215
+ ------------------
216
+
217
+ - Prevent race condition in guarded_import
218
+ (`#123 <https://github.com/zopefoundation/AccessControl/issues/123>`_)
219
+
220
+
221
+ 5.3 (2022-02-25)
222
+ ----------------
223
+
224
+ - Provide ``AccessControl.get_safe_globals`` to facilitate safe use.
225
+
226
+ - Honor ``PURE_PYTHON`` environment variable to enable python implementation
227
+ during runtime.
228
+
229
+ - Add support for Python 3.10.
230
+
231
+
232
+ 5.2 (2021-07-30)
233
+ ----------------
234
+
235
+ - Fix Appveyor configuration so tests can run and wheels build.
236
+
237
+
238
+ 5.1 (2021-07-30)
239
+ ----------------
240
+ NOTE: This release has been yanked from PyPI due to wheel build issues.
241
+
242
+ - Fix a remote code execution issue by preventing access to
243
+ ``string.Formatter`` from restricted code.
244
+
245
+
246
+ 5.0 (2020-10-07)
247
+ ----------------
248
+
249
+ - Add support for Python 3.9.
250
+
251
+ - Remove deprecated classes and functions in
252
+ (see `#32 <https://github.com/zopefoundation/AccessControl/issues/32>`_):
253
+
254
+ + ``AccessControl/DTML.py``
255
+ + ``AccessControl/Owned.py``
256
+ + ``AccessControl/Role.py``
257
+ + ``AccessControl/Permissions.py``
258
+
259
+ - Add deprecation warnings for BBB imports in:
260
+
261
+ + ``AccessControl/AuthEncoding.py``
262
+ + ``AccessControl/Owned.py``
263
+ + ``AccessControl/Role.py``
264
+ + ``AccessControl/User.py``
265
+
266
+ - Although this version might run on Zope 4, it is no longer supported because
267
+ of the dropped deprecation warnings.
268
+
269
+
270
+ 4.2 (2020-04-20)
271
+ ----------------
272
+
273
+ - Add missing permission ``Manage WebDAV Locks``
274
+
275
+ - Fix regression for BBB import of ```users.UnrestrictedUser``
276
+ (`#94 <https://github.com/zopefoundation/AccessControl/issues/94>`_)
277
+
278
+ - Add a check if database is present in ``.owner.ownerInfo``.
279
+ (`#91 <https://github.com/zopefoundation/AccessControl/issues/91>`_).
280
+
281
+
282
+ 4.1 (2019-09-02)
283
+ ----------------
284
+
285
+ - Python 3: Allow iteration over the result of ``dict.{keys,values,items}``
286
+ (`#89 <https://github.com/zopefoundation/AccessControl/issues/89>`_).
287
+
288
+
289
+ 4.0 (2019-05-08)
290
+ ----------------
291
+
292
+ Changes since 3.0.12:
293
+
294
+ - Add support for Python 3.5, 3.6, 3.7 and 3.8.
295
+
296
+ - Restore simple access to bytes methods in Python 3
297
+ (`#83 <https://github.com/zopefoundation/AccessControl/issues/83>`_)
298
+
299
+ - Clarify deprecation warnings for several BBB shims.
300
+ (`#32 <https://github.com/zopefoundation/AccessControl/issues/32>`_)
301
+
302
+ - Add a test to prove that a user folder flag cannot be acquired elsewhere.
303
+ (`#7 <https://github.com/zopefoundation/AccessControl/issues/7>`_)
304
+
305
+ - Tighten basic auth string handling in ``BasicUserFolder.identify``
306
+ (`#56 <https://github.com/zopefoundation/AccessControl/issues/56>`_)
307
+
308
+ - Prevent the Zope 4 ZMI from showing an add dialog for the user folder.
309
+ (`#82 <https://github.com/zopefoundation/AccessControl/issues/82>`_)
310
+
311
+ - Fix order of roles returned by
312
+ ``AccessControl.rolemanager.RoleManager.userdefined_roles``.
313
+
314
+ - Add configuration for `zodbupdate`.
315
+
316
+ - Add ``TaintedBytes`` besides ``TaintedString`` in ``AccessControl.tainted``.
317
+ (`#57 <https://github.com/zopefoundation/AccessControl/issues/57>`_)
318
+
319
+ - Security fix: In ``str.format``, check the security for attributes that are
320
+ accessed. (Ported from 2.13).
321
+
322
+ - Port ``override_container`` context manager here from 2.13.
323
+
324
+ - Add AppVeyor configuration to automate building Windows eggs.
325
+
326
+ - Fix for compilers that only support C89 syntax (e.g. on Windows).
327
+
328
+ - Sanitize and test `RoleManager` role handling.
329
+
330
+ - Depend on RestrictedPython >= 4.0.
331
+
332
+ - #16: Fixed permission handling by avoiding column and row numbers as
333
+ identifiers for permissions and roles.
334
+
335
+ - Extract ``.AuthEncoding`` to its own package for reuse.
336
+
337
+ - Declare missing dependency on BTrees.
338
+
339
+ - Drop `Record` dependency, which now does its own security declaration.
340
+
341
+ - Remove leftovers from history support dropped in Zope.
342
+
343
+ - Remove duplicate guard against * imports.
344
+ (`#60 <https://github.com/zopefoundation/AccessControl/issues/60>`_)
345
+
346
+
347
+ 3.0.12 (2015-12-21)
348
+ -------------------
349
+
350
+ - Avoid acquiring ``access`` from module wrapped by
351
+ ``SecurityInfo._ModuleSecurityInfo``. See:
352
+ https://github.com/zopefoundation/AccessControl/issues/12
353
+
354
+
355
+ 3.0.11 (2014-11-02)
356
+ -------------------
357
+
358
+ - Harden test fix for machines that do not define `localhost`.
359
+
360
+
361
+ 3.0.10 (2014-11-02)
362
+ -------------------
363
+
364
+ - Test fix for machines that do not define `localhost`.
365
+
366
+
367
+ 3.0.9 (2014-08-08)
368
+ ------------------
369
+
370
+ - GitHub #6: Do not pass SecurityInfo instance itself to declarePublic/declarePrivate
371
+ when using the public/private decorator. This fixes ``Conflicting security declarations``
372
+ warnings on Zope startup.
373
+
374
+ - LP #1248529: Leave existing security manager in place inside
375
+ ``RoleManager.manage_getUserRolesAndPermissions``.
376
+
377
+
378
+ 3.0.8 (2013-07-16)
379
+ ------------------
380
+
381
+ - LP #1169923: ensure initialization of shared ``ImplPython`` state
382
+ (used by ``ImplC``) when using the "C" security policy. Thanks to
383
+ Arnaud Fontaine for the patch.
384
+
385
+
386
+ 3.0.7 (2013-05-14)
387
+ ------------------
388
+
389
+ - Remove long-deprecated 'Shared' roles support (pre-dates Zope, never
390
+ used by Zope itself)
391
+
392
+ - Prevent infinite loop when looking up local roles in an acquisition chain
393
+ with cycles.
394
+
395
+
396
+ 3.0.6 (2012-10-31)
397
+ ------------------
398
+
399
+ - LP #1071067: Use a stronger random number generator and a constant time
400
+ comparison function.
401
+
402
+
403
+ 3.0.5 (2012-10-21)
404
+ ------------------
405
+
406
+ - LP #966101: Recognize special `zope2.Private` permission in ZCML
407
+ role directive.
408
+
409
+
410
+ 3.0.4 (2012-09-09)
411
+ ------------------
412
+
413
+ - LP #1047318: Tighten import restrictions for restricted code.
414
+
415
+
416
+ 3.0.3 (2012-08-23)
417
+ ------------------
418
+
419
+ - Fix a bug in ZopeSecurityPolicy.py. Global variable `rolesForPermissionOn`
420
+ could be overridden if `__role__` had custom rolesForPermissionOn.
421
+
422
+
423
+ 3.0.2 (2012-06-22)
424
+ ------------------
425
+
426
+ - Add Anonymous as a default role for Public permission.
427
+
428
+
429
+ 3.0.1 (2012-05-24)
430
+ ------------------
431
+
432
+ - Fix tests under Python 2.6.
433
+
434
+
435
+ 3.0 (2012-05-12)
436
+ ----------------
437
+
438
+ - Added decorators for public, private and protected security declarations.
439
+
440
+ - Update tests to take advantage of automatic test suite discovery.
@@ -1,7 +1,5 @@
1
- #
2
- # Generated from:
3
- # https://github.com/zopefoundation/meta/tree/master/config/c-code
4
-
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code
5
3
  [build-system]
6
4
  requires = [
7
5
  "setuptools",
@@ -11,10 +9,10 @@ build-backend = "setuptools.build_meta"
11
9
 
12
10
  [project]
13
11
  name = "AccessControl"
14
- version = "7.3"
12
+ version = "7.5"
15
13
  description = "Security framework for Zope"
16
14
  keywords = ["security", "access", "authorization"]
17
- readme = "README.rst"
15
+ dynamic = ["readme"]
18
16
  requires-python = ">=3.10"
19
17
  license = "ZPL-2.1"
20
18
  authors = [
@@ -37,6 +35,7 @@ classifiers = [
37
35
  "Programming Language :: Python :: 3.12",
38
36
  "Programming Language :: Python :: 3.13",
39
37
  "Programming Language :: Python :: 3.14",
38
+ "Programming Language :: Python :: 3.15",
40
39
  "Programming Language :: Python :: Implementation :: CPython",
41
40
  ]
42
41
  dependencies = [
@@ -102,3 +101,13 @@ source = [
102
101
  ".tox/*/lib/python*/site-packages/",
103
102
  ".tox/pypy*/site-packages/",
104
103
  ]
104
+
105
+ [tool.setuptools.dynamic]
106
+ readme = {file = ["README.rst", "CHANGES.rst"]}
107
+
108
+
109
+
110
+ [tool.zest-releaser]
111
+ create-wheel = false
112
+ extra-message = ""
113
+ upload-pypi = false
@@ -1,6 +1,3 @@
1
- [zest.releaser]
2
- create-wheel = no
3
-
4
1
  [flake8]
5
2
  doctests = 1
6
3
  per-file-ignores =
@@ -724,6 +724,16 @@ def guarded_getattr(inst, name, default=_marker):
724
724
  if name[:1] == '_':
725
725
  raise Unauthorized(name)
726
726
 
727
+ if name in ('format', 'format_map'):
728
+ if isinstance(inst, str):
729
+ from AccessControl.safe_formatter import safe_format
730
+ from AccessControl.safe_formatter import safe_format_map
731
+ if name == 'format':
732
+ return safe_format(inst, name)
733
+ return safe_format_map(inst, name)
734
+ if isinstance(inst, type) and issubclass(inst, str):
735
+ raise Unauthorized(name)
736
+
727
737
  # Try to get the attribute normally so that unusual
728
738
  # exceptions are caught early.
729
739
  try:
@@ -733,12 +743,14 @@ def guarded_getattr(inst, name, default=_marker):
733
743
  return default
734
744
  raise
735
745
 
736
- try:
737
- container = v.__self__
738
- except AttributeError:
739
- container = aq_parent(aq_inner(v)) or inst
740
-
741
- assertion = Containers(type(container))
746
+ # The container assertion must be keyed on the type of the accessed
747
+ # object, to match the C implementation (see ``cAccessControl.c``, which
748
+ # uses ``Containers(type(inst))``). Keying on ``type(v.__self__)``
749
+ # instead let a bound method whose ``__self__`` is an allow-listed simple
750
+ # type (e.g. ``tuple``, ``bytes``, ``range``) take the truthy-assertion
751
+ # short-circuit and be returned without calling ``validate()`` -- a
752
+ # divergence from the C engine.
753
+ assertion = Containers(type(inst))
742
754
 
743
755
  if isinstance(assertion, dict):
744
756
  # We got a table that lets us reason about individual