From e7c3b7909e3c80c1aceb2159147b33172b2a9269 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 11 Jun 2024 18:22:11 +0100 Subject: [PATCH] Upgrade Python patch versions and add 3.12, 3.11, 3.10 --- .cookiecutter/cookiecutter.json | 4 ++-- .github/workflows/ci.yml | 10 ++++----- .python-version | 7 ++++-- Makefile | 38 +++++++++++++++++++++++++++++---- README.md | 2 +- bin/make_python | 2 +- tox.ini | 2 +- 7 files changed, 49 insertions(+), 16 deletions(-) diff --git a/.cookiecutter/cookiecutter.json b/.cookiecutter/cookiecutter.json index e594e10..7059714 100644 --- a/.cookiecutter/cookiecutter.json +++ b/.cookiecutter/cookiecutter.json @@ -11,7 +11,7 @@ "package_name": "checkmatelib", "slug": "checkmatelib", "short_description": "Tools for interacting with the Checkmate URL checking service.", - "python_versions": "3.9.13,3.8.13", + "python_versions": "3.12.4, 3.11.9, 3.10.14, 3.9.19, 3.8.19", "github_owner": "hypothesis", "copyright_holder": "Hypothesis", "visibility": "public", @@ -25,4 +25,4 @@ "__copyright_year": "2022", "pypi": "yes" } -} \ No newline at end of file +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e15fb56..2cfe8d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.12' - run: python -m pip install 'tox<4' - run: tox -e checkformatting Lint: @@ -32,14 +32,14 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.12' - run: python -m pip install 'tox<4' - run: tox -e lint Tests: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.8'] + python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] name: Unit tests with Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 @@ -64,7 +64,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.12' - name: Download coverage files uses: actions/download-artifact@v3 with: @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.8'] + python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] name: Functional tests with Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 diff --git a/.python-version b/.python-version index e619484..29afc11 100644 --- a/.python-version +++ b/.python-version @@ -1,2 +1,5 @@ -3.9.13 -3.8.13 +3.12.4 +3.11.9 +3.10.14 +3.9.19 +3.8.19 diff --git a/Makefile b/Makefile index 57d6391..ac64e6f 100644 --- a/Makefile +++ b/Makefile @@ -34,10 +34,25 @@ checkformatting: python @pyenv exec tox -qe checkformatting .PHONY: test -$(call help,make test,"run the unit tests in Python 3.9") +$(call help,make test,"run the unit tests in Python 3.12") test: python @pyenv exec tox -qe tests +.PHONY: test-py311 +$(call help,make test-py311,"run the unit tests in Python 3.11") +test-py311: python + @pyenv exec tox -qe py311-tests + +.PHONY: test-py310 +$(call help,make test-py310,"run the unit tests in Python 3.10") +test-py310: python + @pyenv exec tox -qe py310-tests + +.PHONY: test-py39 +$(call help,make test-py39,"run the unit tests in Python 3.9") +test-py39: python + @pyenv exec tox -qe py39-tests + .PHONY: test-py38 $(call help,make test-py38,"run the unit tests in Python 3.8") test-py38: python @@ -46,13 +61,28 @@ test-py38: python .PHONY: coverage $(call help,make coverage,"run the tests and print the coverage report") coverage: python - @pyenv exec tox --parallel -qe 'tests,py{38}-tests,coverage' + @pyenv exec tox --parallel -qe 'tests,py{311,310,39,38}-tests,coverage' .PHONY: functests -$(call help,make functests,"run the functional tests in Python 3.9") +$(call help,make functests,"run the functional tests in Python 3.12") functests: python @pyenv exec tox -qe functests +.PHONY: functests-py311 +$(call help,make functests-py311,"run the functional tests in Python 3.11") +functests-py311: python + @pyenv exec tox -qe py311-functests + +.PHONY: functests-py310 +$(call help,make functests-py310,"run the functional tests in Python 3.10") +functests-py310: python + @pyenv exec tox -qe py310-functests + +.PHONY: functests-py39 +$(call help,make functests-py39,"run the functional tests in Python 3.9") +functests-py39: python + @pyenv exec tox -qe py39-functests + .PHONY: functests-py38 $(call help,make functests-py38,"run the functional tests in Python 3.8") functests-py38: python @@ -62,7 +92,7 @@ functests-py38: python $(call help,make sure,"make sure that the formatting$(comma) linting and tests all pass") sure: python sure: - @pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{38}-tests,coverage,functests,py{38}-functests' + @pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{311,310,39,38}-tests,coverage,functests,py{311,310,39,38}-functests' .PHONY: template $(call help,make template,"update from the latest cookiecutter template") diff --git a/README.md b/README.md index e61d76d..5a68725 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ - + diff --git a/bin/make_python b/bin/make_python index c77808c..a2266ab 100755 --- a/bin/make_python +++ b/bin/make_python @@ -8,7 +8,7 @@ if [ -n "${CI+x}" ]; then exit; fi pyenv_root=$(pyenv root) -for python_version in 3.9.13 3.8.13; do +for python_version in 3.12.4 3.11.9 3.10.14 3.9.19 3.8.19; do bin_dir=$pyenv_root/versions/$python_version/bin if [ ! -f "$bin_dir"/tox ]; then pyenv install --skip-existing "$python_version" diff --git a/tox.ini b/tox.ini index 816a9bf..1526826 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ deps = lint,template: cookiecutter typecheck: mypy depends = - coverage: tests,py{38}-tests + coverage: tests,py{311,310,39,38}-tests commands = dev: {posargs:ipython --classic --no-banner --no-confirm-exit} format: black src tests bin