diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d123b1d..7e2d1fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,16 +17,18 @@ jobs: fail-fast: false matrix: os: - - ["ubuntu", "ubuntu-20.04"] + - ["ubuntu", "ubuntu-latest"] config: # [Python version, tox env] + - ["3.9", "release-check"] - ["3.9", "lint"] - ["3.7", "py37"] - ["3.8", "py38"] - ["3.9", "py39"] - ["3.10", "py310"] - ["3.11", "py311"] - - ["pypy-3.9", "pypy3"] + - ["3.12", "py312"] + - ["pypy-3.10", "pypy3"] - ["3.9", "docs"] - ["3.9", "coverage"] @@ -34,13 +36,13 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.config[0] }} - name: Pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} @@ -56,7 +58,7 @@ jobs: - name: Coverage if: matrix.config[1] == 'coverage' run: | - pip install "coveralls < 4" + pip install coveralls coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.meta.toml b/.meta.toml index 4f07b6a..e9c1ebb 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "b21fbbf2" +commit-id = "b89d6a0a" [python] with-macos = false diff --git a/CHANGES.rst b/CHANGES.rst index 4c7966f..0921d62 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ 5.1 (unreleased) ================ -- Nothing changed yet. +- Add support for Python 3.12. 5.0 (2023-03-29) diff --git a/setup.cfg b/setup.cfg index 3b70e18..e05dc01 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,5 @@ # Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python -[bdist_wheel] -universal = 0 [flake8] doctests = 1 diff --git a/setup.py b/setup.py index 77d77a8..68187f3 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ def read(*rnames): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Zope :: 3", diff --git a/tox.ini b/tox.ini index 72df49d..98658da 100644 --- a/tox.ini +++ b/tox.ini @@ -3,12 +3,14 @@ [tox] minversion = 3.18 envlist = + release-check lint py37 py38 py39 py310 py311 + py312 pypy3 docs coverage @@ -18,27 +20,41 @@ usedevelop = true package = wheel wheel_build_env = .pkg deps = +setenv = + py312: VIRTUALENV_PIP=23.1.2 + py312: PIP_REQUIRE_VIRTUALENV=0 commands = zope-testrunner --test-path=src {posargs:-vc} sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest extras = test docs +[testenv:release-check] +description = ensure that the distribution is ready to release +basepython = python3 +skip_install = true +deps = + twine + build + check-manifest + check-python-versions >= 0.20.0 + wheel +commands_pre = +commands = + check-manifest + check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml + python -m build --sdist --no-isolation + twine check dist/* [testenv:lint] basepython = python3 skip_install = true +deps = + isort + flake8 commands = isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py flake8 src setup.py - check-manifest - check-python-versions -deps = - check-manifest - check-python-versions >= 0.19.1 - wheel - flake8 - isort [testenv:isort-apply] basepython = python3 @@ -68,7 +84,7 @@ commands = coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest coverage html --ignore-errors - coverage report --ignore-errors --show-missing --fail-under=99 + coverage report --show-missing --fail-under=99 [coverage:run] branch = True @@ -76,6 +92,7 @@ source = zope.deprecation [coverage:report] precision = 2 +ignore_errors = True exclude_lines = pragma: no cover pragma: nocover