From 28216829e24bfea4002a4d618439804756a1c614 Mon Sep 17 00:00:00 2001 From: Antoine Meillet Date: Wed, 7 Feb 2024 15:26:46 +0100 Subject: [PATCH] Support latest Python versions Python 3.11 and 3.12 were released since the last commits. --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++------ setup.py | 2 ++ tox.ini | 6 +++--- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9ea108e..4db442f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,11 +5,11 @@ on: [push, pull_request] jobs: # https://docs.github.com/en/actions/guides/building-and-testing-python#testing-your-code run-tests: - name: Run tests and linters (with tox) + name: Run tests (with tox) runs-on: ubuntu-latest strategy: matrix: - python: [3.8, 3.9, '3.10'] + python: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 @@ -24,6 +24,21 @@ jobs: - name: Test against listed Python versions # Run tox using the version of Python in `PATH` run: tox -e py + + run-lint: + name: Run linters (with tox) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.12" + - name: Install Tox and any other packages + run: | + pip install tox + pip install -r requirements.txt -r requirements-dev.txt - name: Run black run: tox -e black - name: Run pylama @@ -38,10 +53,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Python 3.10 + - name: Setup Python 3.12 uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install pypa/build run: | python -m pip install build --user @@ -62,10 +77,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Python 3.10 + - name: Setup Python 3.12 uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install pypa/build run: | python -m pip install build --user diff --git a/setup.py b/setup.py index 33ed92c..5112a86 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,8 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Operating System :: POSIX :: Linux", "Operating System :: MacOS", ], diff --git a/tox.ini b/tox.ini index 23da672..7cdce8f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3{8,9,10},black,pylama +envlist = py3{8,9,10,11,12},black,pylama skip_missing_interpreters = true [testenv] @@ -15,7 +15,7 @@ commands = deps = -rrequirements-dev.txt -basepython = python3.10 +basepython = python3.12 commands = black --check . @@ -23,6 +23,6 @@ commands = deps = -rrequirements-dev.txt -basepython = python3.10 +basepython = python3.12 commands = pylama .