Skip to content

Commit

Permalink
Add preliminary support for Python 3.12rc1. (#1129)
Browse files Browse the repository at this point in the history
* Update RestrictedPython to a version containing security fixes for Python 3.12.

---------

Co-authored-by: Jens Vagelpohl <jens@plyp.com>
  • Loading branch information
icemac and dataflake committed Sep 6, 2023
1 parent 49ec18f commit bc37809
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12.0-alpha.7", "py312"]
- ["3.12.0-rc.1", "py312"]
- ["3.9", "docs"]
- ["3.9", "coverage"]
exclude:
Expand All @@ -41,7 +41,7 @@ jobs:
# macOS/Python 3.11+ is set up for universal2 architecture
# which causes build and package selection issues.
- { os: ["macos", "macos-11"], config: ["3.11", "py311"] }
- { os: ["macos", "macos-11"], config: ["3.12.0-alpha.7", "py312"] }
- { os: ["macos", "macos-11"], config: ["3.12.0-rc.1", "py312"] }

runs-on: ${{ matrix.os[1] }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
Expand Down
3 changes: 2 additions & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "dec712c6"
commit-id = "28abbfda"

[python]
with-pypy = false
Expand Down Expand Up @@ -46,6 +46,7 @@ testenv-commands = [
coverage-basepython = "python3.8"
coverage-command = "coverage run {envdir}/bin/alltests {posargs:-vc}"
testenv-additional = [
"allowlist_externals = *",
"",
"[testenv:pre-commit]",
"basepython = python3",
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst

- Update to newest compatible versions of dependencies.

- Add preliminary support for Python 3.12rc1.

- Make ``mapply`` ``__signature__`` aware.
This allows to publish methods decorated via a decorator
which sets ``__signature__`` on the wrapper to specify
Expand Down
2 changes: 1 addition & 1 deletion src/Zope2/Startup/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_dos_protection(self):

params = ["FORM_%s_LIMIT" % name
for name in ("MEMORY", "DISK", "MEMFILE")]
defaults = dict((name, getattr(HTTPRequest, name)) for name in params)
defaults = {name: getattr(HTTPRequest, name) for name in params}

try:
# missing section
Expand Down
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ deps =
zc.buildout >= 3.0.1
wheel > 0.37
cffi
setenv =
py312: VIRTUALENV_PIP=23.1.2
py312: PIP_REQUIRE_VIRTUALENV=0
commands_pre =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install alltests
commands =
# the `layer` argument below suppresses a `ZCatalog` performance test
# which occasionally fails on GITHUB
{envdir}/bin/alltests --layer '!Products.PluginIndexes' {posargs:-vc}
allowlist_externals = *

[testenv:pre-commit]
basepython = python3
Expand Down
2 changes: 1 addition & 1 deletion versions-prod.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ PasteDeploy = 2.1.1
[versions:python312]
# Use the development version here until the final release to test Products
# against Python 3.12.
RestrictedPython = 7.0a1.dev0
RestrictedPython = 7.0a1.dev1
2 changes: 1 addition & 1 deletion versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ urllib3 = 2.0.3
z3c.checkversions = 2.1
zc.recipe.testrunner = 3.0
zipp = 3.16.2
zope.testrunner = 6.0
zope.testrunner = 6.1

0 comments on commit bc37809

Please sign in to comment.