From 67b8c9c49fe3b2e5980b58112568f75f2fa0e03c Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Thu, 4 Nov 2021 07:47:50 +0100 Subject: [PATCH] Add support for Python 3.10. --- .editorconfig | 2 +- .github/workflows/tests.yml | 11 +++++++---- .gitignore | 2 ++ .meta.toml | 5 +++-- CHANGES.rst | 2 +- README.rst | 4 ++-- setup.py | 1 + tox.ini | 16 +++++----------- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index f3e46f5..c5508b9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -28,7 +28,7 @@ max_line_length = off # 4 space indentation indent_size = 4 -[*.{yml,zpt,pt,dtml}] +[*.{yml,zpt,pt,dtml,zcml}] # 2 space indentation indent_size = 2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 38cb0de..d31f648 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,21 +16,24 @@ jobs: # We want to see all failures: fail-fast: false matrix: + os: + - ubuntu config: # [Python version, tox env] - - ["3.8", "lint"] + - ["3.9", "lint"] - ["2.7", "py27"] - ["3.5", "py35"] - ["3.6", "py36"] - ["3.7", "py37"] - ["3.8", "py38"] - ["3.9", "py39"] + - ["3.10", "py310"] - ["pypy2", "pypy"] - ["pypy3", "pypy3"] - - ["3.8", "docs"] - - ["3.8", "coverage"] + - ["3.9", "docs"] + - ["3.9", "coverage"] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }}-latest name: ${{ matrix.config[1] }} steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 9a9e9b9..c724a76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ # Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python +*.dll *.egg-info/ *.profraw *.pyc *.pyo +*.so .coverage .coverage.* .eggs/ diff --git a/.meta.toml b/.meta.toml index fcc59a1..7bb3250 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,14 +2,15 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "785810f9b7cf459f84c3b1a45eb2d639bfb666d2" +commit-id = "7788b0c785ec23246369c0df9c6010e0047d8645" [python] -with-appveyor = false with-pypy = true with-legacy-python = true with-docs = true with-sphinx-doctests = true +with-windows = false +with-future-python = false [tox] use-flake8 = true diff --git a/CHANGES.rst b/CHANGES.rst index 68808c3..5cc5c63 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ - Avoid traceback reference cycle in ``PageTemplate._cook``. -- Add support for Python 3.9. +- Add support for Python 3.9 and 3.10. 4.5.0 (2020-02-10) diff --git a/README.rst b/README.rst index 70d8a99..7639d3c 100644 --- a/README.rst +++ b/README.rst @@ -10,8 +10,8 @@ :target: https://pypi.org/project/zope.pagetemplate/ :alt: Supported Python versions -.. image:: https://travis-ci.com/zopefoundation/zope.pagetemplate.svg?branch=master - :target: https://travis-ci.com/zopefoundation/zope.pagetemplate +.. image:: https://github.com/zopefoundation/zope.pagetemplate/actions/workflows/tests.yml/badge.svg + :target: https://github.com/zopefoundation/zope.pagetemplate/actions/workflows/tests.yml .. image:: https://coveralls.io/repos/github/zopefoundation/zope.pagetemplate/badge.svg?branch=master :target: https://coveralls.io/github/zopefoundation/zope.pagetemplate?branch=master diff --git a/setup.py b/setup.py index 72131e7..c26ef3f 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ def read(*rnames): 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', diff --git a/tox.ini b/tox.ini index bbaa8d6..77c9b01 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ envlist = py37 py38 py39 + py310 pypy pypy3 docs @@ -18,12 +19,9 @@ envlist = [testenv] usedevelop = true deps = - zope.testrunner - # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: - Sphinx < 4 commands = zope-testrunner --test-path=src {posargs:-vc} - sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest + !py27-!pypy: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest extras = test docs @@ -34,7 +32,8 @@ skip_install = true deps = flake8 check-manifest - check-python-versions + check-python-versions >= 0.19.1 + wheel commands = flake8 src setup.py check-manifest @@ -43,8 +42,6 @@ commands = [testenv:docs] basepython = python3 skip_install = false -# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: -deps = Sphinx < 4 commands_pre = commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html @@ -57,9 +54,6 @@ allowlist_externals = deps = coverage coverage-python-version - # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: - Sphinx < 4 - zope.testrunner commands = mkdir -p {toxinidir}/parts/htmlcov coverage run -m zope.testrunner --test-path=src {posargs:-vc} @@ -70,7 +64,7 @@ commands = [coverage:run] branch = True plugins = coverage_python_version -source = src +source = zope.pagetemplate [coverage:report] precision = 2