Skip to content

[6.2] Use AccessControl 7.7 and RestrictedPython 9.0 on Python 3.11+ - #1143

Merged
mauritsvanrees merged 2 commits into
6.2from
accesscontrol-6.2
Nov 5, 2026
Merged

mauritsvanrees merged 2 commits into
6.2from
accesscontrol-6.2

Conversation

@mauritsvanrees

Copy link
Copy Markdown
Member

Use the newest AccessControl and RestrictedPython on Python 3.11+. Both need Python 3.11, so on Python 3.10 we keep the current pins. This is the same change as #1141 for 6.1.

Package Python 3.11+ Python 3.10 Zope 6.2 pin
AccessControl 7.7 7.4 7.4
RestrictedPython 9.0 8.5 8.4
  • AccessControl 7.6 adds safeguards to allow_class, allow_module and allow_type against use from untrusted code.
  • RestrictedPython 9.0 removes bytes, sorted, tuple and zip from safe_builtins, because they iterate their argument in C, bypassing the _getiter_ guard.
  • AccessControl 7.7 adds guarded versions of these to safe_builtins (zip was already guarded), so restricted code in Zope keeps them. So RestrictedPython 9.0 needs AccessControl 7.7.
  • AccessControl 7.5 only adds Python 3.15 support, so Python 3.10 keeps the Zope pin 7.4.

These are per-Python pins in versions.cfg, and two lines each in the version-overrides of mx.ini. The Python 3.10 lines use a different spelling (Accesscontrol, Restrictedpython), because mxdev keeps only one override per name, and the name is case sensitive.

Also in this PR

  • Version annotation for cryptography: since version 49 there are no wheels for x86_64 (Intel) macOS, only arm64. Taken over from 6.1.
  • AGENTS.md: improvements from the 6.1 and 6.0 branches: a description of this branch (Zope 6.2, Python 3.10-3.14), a check that all pins resolve together with their dependencies, and checking requires_dist for new dependencies on bugfix releases too.

Checked

  • Test suites on Python 3.14 with AccessControl 7.7 and RestrictedPython 9.0: AccessControl 7.7 (355 tests), DocumentTemplate 5.3 (240 tests) and Products.PythonScripts 5.3.1 (56 tests) all pass. Zope 6.2 has 2 failures out of 1735, in two German i18n tests of Products.Five that fail the same way with AccessControl 7.4 and RestrictedPython 8.5.
  • mxdev disables the Zope pins and leaves one active line per Python version. A pip dry run picks the right versions on Python 3.10 and 3.14.
  • pip-audit: no new findings.
  • All pins of constraints.txt, constraints-extra.txt and constraints-ecosystem.txt can be installed, and resolve together with their dependencies, on Python 3.10 and 3.14.

The Plone test suite has not been run with these versions yet: CI and Jenkins should do that.

🤖 Generated with Claude Code

- AccessControl 7.6 adds safeguards to allow_class, allow_module and
  allow_type against use from untrusted code.
- RestrictedPython 9.0 removes bytes, sorted, tuple and zip from
  safe_builtins, because they iterate their argument in C, bypassing the
  _getiter_ guard.  AccessControl 7.7 adds guarded versions of these.

Both need Python 3.11+.  On Python 3.10 we keep AccessControl 7.4 (the Zope
pin) and RestrictedPython 8.5.  These are per-Python pins in versions.cfg,
and two lines each in the version-overrides of mx.ini.

Also add a version annotation for cryptography: since version 49 there are
no wheels for x86_64 (Intel) macOS.

Same as on Plone 6.1 (PR #1141).
- Describe the branch: Plone 6.2, Zope 6.2, Python 3.10 up to 3.14.
- Check that all pins resolve together with their dependencies.
- Check requires_dist for new dependencies, also for bugfix releases.
- Update the list of Python-specific pins that plone.versioncheck misses.
@mauritsvanrees

Copy link
Copy Markdown
Member Author

@jenkins-plone-org please run jobs

@mauritsvanrees
mauritsvanrees merged commit 31a3758 into 6.2 Nov 5, 2026
40 checks passed
@mauritsvanrees
mauritsvanrees deleted the accesscontrol-6.2 branch November 5, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants