From c227d3b0e1937469d50e54f81a6847e721c8f72a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 16 Sep 2023 15:08:18 +0300 Subject: [PATCH] Add support for Python 3.12 --- .github/workflows/build-release.yml | 22 ++++++++++++---------- pyproject.toml | 2 +- setup.py | 1 + tox.ini | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 02a5a6ddb..1c88a564d 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -10,8 +10,8 @@ jobs: name: mypy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4.0.0 + - uses: actions/setup-python@v4.7.0 with: python-version: '3.11' - run: python -m pip install --upgrade pip @@ -21,8 +21,8 @@ jobs: name: docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4.0.0 + - uses: actions/setup-python@v4.7.0 with: python-version: '3.11' - run: python -m pip install --upgrade pip wheel @@ -37,11 +37,13 @@ jobs: include: - {name: '3.8', python: '3.8', tox: py38} - {name: '3.11', python: '3.11', tox: py311} + - {name: '3.12', python: '3.12', tox: py312} steps: - - uses: actions/checkout@v3.1.0 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4.0.0 + - uses: actions/setup-python@v4.7.0 with: python-version: ${{ matrix.python }} + allow-prereleases: true - run: python -m pip install --upgrade pip - run: python -m pip install tox - run: python -m tox -e ${{ matrix.tox }} @@ -52,8 +54,8 @@ jobs: if: startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4.0.0 + - uses: actions/setup-python@v4.7.0 with: python-version: '3.11' - run: python -m pip install --upgrade pip @@ -65,8 +67,8 @@ jobs: if: startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4.0.0 + - uses: actions/setup-python@v4.7.0 - name: install requirements run: python -m pip install build twine - name: build dists diff --git a/pyproject.toml b/pyproject.toml index 16955db25..4c6215c0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [tool.black] line-length = 88 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] diff --git a/setup.py b/setup.py index bb8749c7e..70de4a76f 100644 --- a/setup.py +++ b/setup.py @@ -83,6 +83,7 @@ def read(fname): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], test_suite="tests", project_urls={ diff --git a/tox.ini b/tox.ini index 29e6884bf..bb8d330ab 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,mypy-test,py38,py39,py310,py311,docs +envlist = lint,mypy-test,py{38,39,310,311,312},docs [testenv] extras = tests