diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f17e7f5ec1..66822bd07f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,7 @@ jobs: - ["3.8", "py38"] - ["3.9", "py39"] - ["3.10", "py310"] + - ["3.11.0-beta.5", "py311"] - ["3.9", "docs"] - ["3.9", "coverage"] exclude: @@ -35,6 +36,7 @@ jobs: - { os: windows, config: ["3.9", "coverage"] } runs-on: ${{ matrix.os }}-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.os }}-${{ matrix.config[1] }} steps: - uses: actions/checkout@v2 @@ -59,7 +61,7 @@ jobs: - name: Coverage if: matrix.config[1] == 'coverage' run: | - pip install coveralls coverage-python-version + pip install coveralls coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.meta.toml b/.meta.toml index 1585d209d3..1338d83a49 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 = "387516cfda91ee38cde868ef0d6205314a6a9bef" +commit-id = "4689333adccd5ee16eda132085f840cc33248b57" [python] with-pypy = false @@ -10,7 +10,7 @@ with-legacy-python = false with-docs = true with-sphinx-doctests = false with-windows = true -with-future-python = false +with-future-python = true [coverage] fail-under = 80 diff --git a/CHANGES.rst b/CHANGES.rst index f7ce6be6d3..314fe65273 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,13 +7,15 @@ since the branch point at Zope 4.1.2. The change log for the previous version, Zope 4, is at https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst -5.5.3 (unreleased) ------------------- +5.6 (unreleased) +---------------- - Make Products.PageTemplate engine compatible with Chameleon 3.10. - Update to newest compatible versions of dependencies. +- Add preliminary support for Python 3.11 (as of 3.11.0b5). + - Fix cookie path parameter handling: If the cookie path value contains ``%`` it is assumed to be fully quoted and used as is; diff --git a/buildout.cfg b/buildout.cfg index aebf58e9b2..97c790800e 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -18,7 +18,6 @@ parts = sources-dir = develop auto-checkout = - [testenv] PYTHONHASHSEED = random diff --git a/constraints.txt b/constraints.txt index b8e558cedf..b9552f7d0c 100644 --- a/constraints.txt +++ b/constraints.txt @@ -12,9 +12,14 @@ Paste==3.5.1 PasteDeploy==2.1.1 Persistence==3.3 Products.BTreeFolder2==4.3 -Products.ZCatalog==6.2 +Products.ZCatalog==6.3 Record==3.5 -RestrictedPython==5.2 +RestrictedPython==5.2; python_version == '3.10' +RestrictedPython==5.2; python_version == '3.6' +RestrictedPython==5.2; python_version == '3.7' +RestrictedPython==5.2; python_version == '3.8' +RestrictedPython==5.2; python_version == '3.9' +RestrictedPython==6.0a1.dev0; python_version > '3.10' SecretStorage==3.3.2 WSGIProxy2==0.5.1 WebOb==1.8.7 @@ -55,7 +60,7 @@ zope.cachedescriptors==4.3.1 zope.component==5.0.1 zope.componentvocabulary==2.3.0 zope.configuration==4.4.1 -zope.container==4.5.0 +zope.container==4.6 zope.contentprovider==4.2.1 zope.contenttype==4.5.0 zope.datetime==4.3.0 diff --git a/requirements-full.txt b/requirements-full.txt index 8c95908153..307a2ba248 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -13,9 +13,14 @@ Paste==3.5.1 PasteDeploy==2.1.1 Persistence==3.3 Products.BTreeFolder2==4.3 -Products.ZCatalog==6.2 +Products.ZCatalog==6.3 Record==3.5 -RestrictedPython==5.2 +RestrictedPython==5.2; python_version == '3.10' +RestrictedPython==5.2; python_version == '3.6' +RestrictedPython==5.2; python_version == '3.7' +RestrictedPython==5.2; python_version == '3.8' +RestrictedPython==5.2; python_version == '3.9' +RestrictedPython==6.0a1.dev0; python_version > '3.10' SecretStorage==3.3.2 WSGIProxy2==0.5.1 WebOb==1.8.7 @@ -56,7 +61,7 @@ zope.cachedescriptors==4.3.1 zope.component==5.0.1 zope.componentvocabulary==2.3.0 zope.configuration==4.4.1 -zope.container==4.5.0 +zope.container==4.6 zope.contentprovider==4.2.1 zope.contenttype==4.5.0 zope.datetime==4.3.0 diff --git a/setup.py b/setup.py index 0d2c776b13..ad0a8ee3a3 100644 --- a/setup.py +++ b/setup.py @@ -29,8 +29,7 @@ def _read_file(filename): README = _read_file('README.rst') CHANGES = _read_file('CHANGES.rst') -version = '5.5.3.dev0' - +version = '5.6.dev0' setup( name='Zope', diff --git a/sources.cfg b/sources.cfg index bce9652678..e9484e3499 100644 --- a/sources.cfg +++ b/sources.cfg @@ -31,6 +31,7 @@ Products.SiteErrorLog = git ${remotes:github}/Products.SiteErrorLog pushurl=${re Record = git ${remotes:github}/Record pushurl=${remotes:github_push}/Record # ZTK +zodbpickle = git ${remotes:github}/zodbpickle zope.annotation = git ${remotes:github}/zope.annotation zope.browser = git ${remotes:github}/zope.browser zope.browsermenu = git ${remotes:github}/zope.browsermenu diff --git a/tox.ini b/tox.ini index 7922c3f2d4..4679be6cdf 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ envlist = py38 py39 py310 + py311 docs coverage pre-commit @@ -92,7 +93,6 @@ allowlist_externals = deps = {[testenv]deps} coverage - coverage-python-version commands = mkdir -p {toxinidir}/parts/htmlcov coverage run {envdir}/bin/alltests {posargs:-vc} @@ -101,7 +101,6 @@ commands = [coverage:run] branch = True -plugins = coverage_python_version source = src [coverage:report] diff --git a/util.py b/util.py index 5da828ff3d..739a027b19 100644 --- a/util.py +++ b/util.py @@ -1,5 +1,6 @@ import os from typing import Optional, Tuple, List +from configparser import NoSectionError from configparser import RawConfigParser @@ -24,9 +25,17 @@ def generate(in_, requirements_file, constraints_file): constraints = [] zope_requirement = ( '-e git+https://github.com/zopefoundation/Zope.git@master#egg=Zope\n') - zope_requirement = _generate( - parser.items('versions:python36'), '3.6', requirements, constraints, - zope_requirement) + + # Try to include sections for all currently supported Python versions + for py_version in ('3.6', '3.7', '3.8', '3.9', '3.10', '3.11'): + short_version = py_version.replace('.', '') + try: + zope_requirement = _generate( + parser.items(f'versions:python{short_version}'), py_version, + requirements, constraints, zope_requirement) + except NoSectionError: + continue + # "Unversioned" pins must come last, how they are handled depends on # Python version qualifiers for dependencies of the same name. zope_requirement = _generate( @@ -51,7 +60,7 @@ def _generate( ) -> str: """Generate requirements and constraints for a specific Python version. - If ``python_version`` is falsy, generate for all python versions. + If ``python_version`` is false, generate for all python versions. Returns a probably changed ``zope_requirement``. """ global PYTHON_VERSIONED @@ -74,7 +83,8 @@ def _generate( PYTHON_VERSIONED[name] = versions else: if name in PYTHON_VERSIONED: - versions = sorted(PYTHON_VERSIONED.get(name)) + versions = sorted(PYTHON_VERSIONED.get(name), + key=lambda s: list(map(int, s.split('.')))) spec = f"{spec}; python_version > '{versions[-1]}'" requirements.append(spec + '\n') diff --git a/versions-prod.cfg b/versions-prod.cfg index 2d003efe00..6ba47326d6 100644 --- a/versions-prod.cfg +++ b/versions-prod.cfg @@ -20,7 +20,7 @@ Persistence = 3.3 Products.BTreeFolder2 = 4.3 Products.ZCatalog = 6.3 Record = 3.5 -RestrictedPython = 5.2 +RestrictedPython = 6.0a1.dev0 SecretStorage = 3.3.2 WSGIProxy2 = 0.5.1 WebOb = 1.8.7 @@ -58,7 +58,7 @@ zope.cachedescriptors = 4.3.1 zope.component = 5.0.1 zope.componentvocabulary = 2.3.0 zope.configuration = 4.4.1 -zope.container = 4.5.0 +zope.container = 4.6 zope.contentprovider = 4.2.1 zope.contenttype = 4.5.0 zope.datetime = 4.3.0 @@ -100,3 +100,16 @@ zope.viewlet = 4.3 [versions:python36] jeepney = 0.7.1 waitress = 2.0.0 +RestrictedPython = 5.2 + +[versions:python37] +RestrictedPython = 5.2 + +[versions:python38] +RestrictedPython = 5.2 + +[versions:python39] +RestrictedPython = 5.2 + +[versions:python310] +RestrictedPython = 5.2 diff --git a/versions.cfg b/versions.cfg index 21f914871a..a92a3eca07 100644 --- a/versions.cfg +++ b/versions.cfg @@ -21,8 +21,10 @@ docutils = 0.17.1 idna = 3.3 imagesize = 1.3.0 mr.developer = 2.0.1 +packaging = 21.3 plone.recipe.command = 1.1 pycparser = 2.21 +pyparsing = 3.0.7 python-gettext = 4.0 requests = 2.28.1 snowballstemmer = 2.2.0