From 054c2581e1c5fe93fdfa49e9479514344dc44065 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Fri, 31 May 2024 10:07:53 +0000 Subject: [PATCH] Preliminary support for Python 3.13, second try (#1215) * - try Python 3.13 * - use legacy-cgi module to overcome WebOb issue * - there's no reason to exclude future_python on macOS anymore * - use latest zope.testbrowser and remove dependency on legacy-cgi * - add explanatory note for legacy-cgi version pin --- .github/workflows/tests.yml | 2 ++ .meta.toml | 6 +++--- constraints.txt | 11 ++++++++--- requirements-full.txt | 11 ++++++++--- tox.ini | 3 ++- versions-prod.cfg | 24 +++++++++++++++++++++--- versions.cfg | 2 ++ 7 files changed, 46 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 391637c1b7..bb945227c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,7 @@ jobs: - ["3.10", "py310"] - ["3.11", "py311"] - ["3.12", "py312"] + - ["3.13", "py313"] - ["3.9", "docs"] - ["3.9", "coverage"] exclude: @@ -50,6 +51,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.config[0] }} + allow-prereleases: true - name: Pip cache uses: actions/cache@v4 with: diff --git a/.meta.toml b/.meta.toml index 45294331e3..78591f6c03 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/zope-product [meta] template = "zope-product" -commit-id = "8d837c89" +commit-id = "6cd77955" [python] with-pypy = false @@ -10,7 +10,7 @@ with-docs = true with-sphinx-doctests = false with-windows = true with-macos = true -with-future-python = false +with-future-python = true [coverage] fail-under = 80 @@ -30,7 +30,7 @@ additional-config = [ [tox] testenv-deps = [ - "cffi", + "cffi >= 1.17.0rc1", "# The universal2 environment is for Python on macOS built with", "# universal2 mode instead of architecture-specific. These dependencies", "# must be installed separately, zc.buildout is incompatible with the", diff --git a/constraints.txt b/constraints.txt index 8b182d23f1..f1417a392d 100644 --- a/constraints.txt +++ b/constraints.txt @@ -11,7 +11,12 @@ MultiMapping==5.0 Paste==3.10.1 PasteDeploy==3.1.0 Persistence==5.0 -RestrictedPython==7.1 +RestrictedPython==7.1; python_version == '3.10' +RestrictedPython==7.1; python_version == '3.11' +RestrictedPython==7.1; python_version == '3.12' +RestrictedPython==7.1; python_version == '3.8' +RestrictedPython==7.1; python_version == '3.9' +RestrictedPython==7.2a1.dev0; python_version > '3.12' WSGIProxy2==0.5.1 WebOb==1.8.7 WebTest==3.0.0 @@ -19,7 +24,7 @@ ZConfig==4.1 ZODB==6.0 Zope2==4.0 beautifulsoup4==4.12.3 -cffi==1.16.0 +cffi==1.17.0rc1 multipart==0.2.4 persistent==6.0 pycparser==2.22 @@ -73,7 +78,7 @@ zope.size==5.0 zope.structuredtext==5.0 zope.tal==5.0.1 zope.tales==6.0 -zope.testbrowser==6.0 +zope.testbrowser==7.0 zope.testing==5.0.1 zope.traversing==5.0 zope.viewlet==5.0 diff --git a/requirements-full.txt b/requirements-full.txt index 05daad6d43..2d254b4c4b 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -12,7 +12,12 @@ MultiMapping==5.0 Paste==3.10.1 PasteDeploy==3.1.0 Persistence==5.0 -RestrictedPython==7.1 +RestrictedPython==7.1; python_version == '3.10' +RestrictedPython==7.1; python_version == '3.11' +RestrictedPython==7.1; python_version == '3.12' +RestrictedPython==7.1; python_version == '3.8' +RestrictedPython==7.1; python_version == '3.9' +RestrictedPython==7.2a1.dev0; python_version > '3.12' WSGIProxy2==0.5.1 WebOb==1.8.7 WebTest==3.0.0 @@ -20,7 +25,7 @@ ZConfig==4.1 ZODB==6.0 Zope2==4.0 beautifulsoup4==4.12.3 -cffi==1.16.0 +cffi==1.17.0rc1 multipart==0.2.4 persistent==6.0 pycparser==2.22 @@ -74,7 +79,7 @@ zope.size==5.0 zope.structuredtext==5.0 zope.tal==5.0.1 zope.tales==6.0 -zope.testbrowser==6.0 +zope.testbrowser==7.0 zope.testing==5.0.1 zope.traversing==5.0 zope.viewlet==5.0 diff --git a/tox.ini b/tox.ini index 27ff40a780..f2e188c03e 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ envlist = py310 py311 py312 + py313 docs coverage pre-commit @@ -20,7 +21,7 @@ deps = setuptools < 69 zc.buildout >= 3.0.1 wheel > 0.37 - cffi + cffi >= 1.17.0rc1 # The universal2 environment is for Python on macOS built with # universal2 mode instead of architecture-specific. These dependencies # must be installed separately, zc.buildout is incompatible with the diff --git a/versions-prod.cfg b/versions-prod.cfg index f630e925b7..c0470a0f92 100644 --- a/versions-prod.cfg +++ b/versions-prod.cfg @@ -16,14 +16,14 @@ MultiMapping = 5.0 Paste = 3.10.1 PasteDeploy = 3.1.0 Persistence = 5.0 -RestrictedPython = 7.1 +RestrictedPython = 7.2a1.dev0 WebTest = 3.0.0 WSGIProxy2 = 0.5.1 WebOb = 1.8.7 ZConfig = 4.1 ZODB = 6.0 beautifulsoup4 = 4.12.3 -cffi = 1.16.0 +cffi = 1.17.0rc1 multipart = 0.2.4 persistent = 6.0 pycparser = 2.22 @@ -77,7 +77,7 @@ zope.size = 5.0 zope.structuredtext = 5.0 zope.tal = 5.0.1 zope.tales = 6.0 -zope.testbrowser = 6.0 +zope.testbrowser = 7.0 zope.testing = 5.0.1 zope.traversing = 5.0 zope.viewlet = 5.0 @@ -85,3 +85,21 @@ zope.viewlet = 5.0 [versions:python38] # Chameleon >= 4.5 requires Python 3.9 Chameleon = 4.4.4 +# Use newest final release +RestrictedPython = 7.1 + +[versions:python39] +# Use newest final release +RestrictedPython = 7.1 + +[versions:python310] +# Use newest final release +RestrictedPython = 7.1 + +[versions:python311] +# Use newest final release +RestrictedPython = 7.1 + +[versions:python312] +# Use newest final release +RestrictedPython = 7.1 diff --git a/versions.cfg b/versions.cfg index ee828b30f5..f987e61097 100644 --- a/versions.cfg +++ b/versions.cfg @@ -25,6 +25,8 @@ five.localsitemanager = 4.0 idna = 3.7 imagesize = 1.4.1 importlib-metadata = 7.1.0 +# Required by zope.testbrowser on Python 3.13 because WebOb still uses cgi. +legacy-cgi = 2.6 mr.developer = 2.0.2 packaging = 24.0 plone.recipe.command = 1.1