From 7816a55e9076e854925b62a96e75511397bf4f87 Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Thu, 10 Aug 2023 01:35:53 -0700 Subject: [PATCH 1/4] Add Python 3.12 trove classifier --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index aba3966..438c4a3 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ def run(self): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Testing", ], ) From 73979a2129db3b6dbd759dacc89290352f3da451 Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Thu, 10 Aug 2023 01:32:52 -0700 Subject: [PATCH 2/4] Add a Python 3.12 test environment to the default list in tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 541ccf1..8e161d7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{35,36,37,38,39,310,311,py3}{,-smtp},lint +envlist = py{35,36,37,38,39,310,311,312,py3}{,-smtp},lint recreate = True isolated_build = True From 0177033cfee5f1224ec1673b4749367ac2809f7a Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Thu, 10 Aug 2023 01:39:19 -0700 Subject: [PATCH 3/4] Update actionlint-docker pre-commit hook This allows the linter to recognize the new allow-prereleases attribute in setup-python@v4. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3cb4030..b302dd9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,6 +43,6 @@ repos: args: [--py3-plus] - repo: https://github.com/rhysd/actionlint - rev: v1.6.23 + rev: v1.6.25 hooks: - id: actionlint-docker From 16504a061acf5db7f3162f8589a5f178c519fe3d Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Thu, 10 Aug 2023 01:32:22 -0700 Subject: [PATCH 4/4] Add Python 3.12 testing to CI I also updated setup-python action to v4 to support allow-prereleases, which is necessary to use unreleased versions of Python. (3.12 is at release candidate status so it's basically ready, but it's not technically a stable version yet.) --- .github/workflows/tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9101a3c..aa10369 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: # Not all Python versions are available for linux AND x64 # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json os: ['ubuntu-latest'] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9'] extra: ['', '-smtp'] # The forced pytest versions correspond with the lower bounds in tox.ini pytest-version: ['', '--force-dep pytest==4', '--force-dep pytest==6.2.4'] @@ -34,14 +34,17 @@ jobs: pytest-version: '--force-dep pytest==4' - python-version: '3.11' pytest-version: '--force-dep pytest==4' + - python-version: '3.12' + pytest-version: '--force-dep pytest==4' fail-fast: false steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | python -m pip install --upgrade pip