From cf2dd6d2647ae62af678f37296548c75790fee5d Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Thu, 25 Apr 2024 07:15:42 +0200 Subject: [PATCH] - update meta/config template and add Python 3.12/3.13 support --- .github/workflows/tests.yml | 11 +++++++---- .meta.toml | 5 +++-- CHANGES.rst | 2 ++ setup.cfg | 4 +--- setup.py | 2 ++ tox.ini | 36 ++++++++++++++++++++++++++++-------- 6 files changed, 43 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e45a78..44df8d4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,26 +20,29 @@ jobs: - ["ubuntu", "ubuntu-20.04"] 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"] + - ["3.13.0-alpha - 3.13.0", "py313"] + - ["pypy-3.10", "pypy3"] - ["3.9", "coverage"] 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 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') }} diff --git a/.meta.toml b/.meta.toml index e24b7f6..9de1f83 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 = "f6bd0f55" +commit-id = "612c13eb" [python] with-sphinx-doctests = false -with-future-python = false +with-future-python = true with-pypy = true with-macos = false with-windows = false +with-docs = false [tox] use-flake8 = true diff --git a/CHANGES.rst b/CHANGES.rst index 5aab4e7..1b5036c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,8 @@ Change log 4.2 (unreleased) ---------------- +- Add support for Python 3.12 and 3.13. + 4.1 (2023-05-26) ---------------- diff --git a/setup.cfg b/setup.cfg index 1465440..064a6fe 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 @@ -15,7 +13,7 @@ ignore = force_single_line = True combine_as_imports = True sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER -known_third_party = six, docutils, pkg_resources, pytz +known_third_party = docutils, pkg_resources, pytz known_zope = known_first_party = default_section = ZOPE diff --git a/setup.py b/setup.py index 1c71f2e..8cc7801 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,8 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'License :: OSI Approved :: Zope Public License', diff --git a/tox.ini b/tox.ini index e10cac1..10d4659 100644 --- a/tox.ini +++ b/tox.ini @@ -3,38 +3,58 @@ [tox] minversion = 3.18 envlist = + release-check lint py37 py38 py39 py310 py311 + py312 + py313 pypy3 coverage [testenv] usedevelop = true +package = wheel +wheel_build_env = .pkg +pip_pre = py313: true deps = zope.testrunner +setenv = + py312: VIRTUALENV_PIP=23.1.2 + py312: PIP_REQUIRE_VIRTUALENV=0 commands = zope-testrunner --test-path=src {posargs:-vc} extras = test +[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