From 75980b96326f0225e37c84fb08cbbcfc76f5b6da Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 10 Nov 2023 08:24:48 +0100 Subject: [PATCH] Add support for Python 3.12. Add preliminary support for Python 3.13a2. --- .github/workflows/tests.yml | 4 +++- .meta.toml | 2 +- CHANGES.rst | 4 +++- setup.py | 1 + tox.ini | 30 +++++++++++++++++++++--------- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 82ca7ed..8b3bcbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,13 +20,15 @@ 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"] - - ["3.12.0-rc.3", "py312"] + - ["3.12", "py312"] + - ["3.13.0-alpha - 3.13.0", "py313"] - ["pypy-3.9", "pypy3"] - ["3.9", "docs"] - ["3.9", "coverage"] diff --git a/.meta.toml b/.meta.toml index 2678ab4..4f73e55 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 = "6f8d8c51" [python] with-pypy = true diff --git a/CHANGES.rst b/CHANGES.rst index 23d7bcb..81c468e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,7 +9,9 @@ - Drop support for deprecated ``python setup.py test.``. -- Add preliminary support for Python 3.12b1. +- Add support for Python 3.12. + +- Add preliminary support for Python 3.13a2. 3.1.0 (2023-03-17) diff --git a/setup.py b/setup.py index 383bae9..40605f7 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ def _read_file(filename): "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 :: ZODB", diff --git a/tox.ini b/tox.ini index 40bb220..d50444f 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ [tox] minversion = 3.18 envlist = + release-check lint py37 py38 @@ -10,6 +11,7 @@ envlist = py310 py311 py312 + py313 pypy3 docs coverage @@ -18,7 +20,7 @@ envlist = usedevelop = true package = wheel wheel_build_env = .pkg -pip_pre = py312: true +pip_pre = py313: true deps = zope.testrunner Sphinx @@ -31,21 +33,31 @@ commands = extras = test docs - -[testenv:lint] +[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 = - isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py - flake8 src setup.py check-manifest check-python-versions + python -m build --sdist --no-isolation + twine check dist/* + +[testenv:lint] +basepython = python3 +skip_install = true deps = - check-manifest - check-python-versions >= 0.19.1 - wheel - flake8 isort + flake8 +commands = + isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py + flake8 src setup.py [testenv:isort-apply] basepython = python3