From 0b5c3932a85f309dbb809a11bfb86c685e525a33 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 11 Jun 2024 18:13:24 +0100 Subject: [PATCH] Upgrade Python patch versions and add 3.10, 3.9 The code doesn't work with 3.8 --- .cookiecutter/cookiecutter.json | 2 +- .github/workflows/ci.yml | 4 ++-- .python-version | 6 ++++-- Makefile | 24 ++++++++++++++++++++++-- README.md | 2 +- bin/make_python | 2 +- setup.cfg | 2 +- tox.ini | 2 +- 8 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.cookiecutter/cookiecutter.json b/.cookiecutter/cookiecutter.json index abb136d..0f6b8d4 100644 --- a/.cookiecutter/cookiecutter.json +++ b/.cookiecutter/cookiecutter.json @@ -8,7 +8,7 @@ "package_name": "dependabot_alerts", "slug": "dependabot-alerts", "short_description": "Notifications of Dependabot alerts across a GitHub organization.", - "python_versions": "3.12.3, 3.11.6", + "python_versions": "3.12.4, 3.11.9, 3.10.14, 3.9.19", "github_owner": "hypothesis", "copyright_holder": "Hypothesis", "visibility": "public", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48e0f27..4c3d092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.12', '3.11'] + python-version: ['3.12', '3.11', '3.10', '3.9'] name: Unit tests with Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.12', '3.11'] + python-version: ['3.12', '3.11', '3.10', '3.9'] name: Functional tests with Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 diff --git a/.python-version b/.python-version index 301487e..8c5ed07 100644 --- a/.python-version +++ b/.python-version @@ -1,2 +1,4 @@ -3.12.3 -3.11.6 +3.12.4 +3.11.9 +3.10.14 +3.9.19 diff --git a/Makefile b/Makefile index f2180fe..aa5a9cd 100644 --- a/Makefile +++ b/Makefile @@ -43,10 +43,20 @@ $(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: coverage $(call help,make coverage,"run the tests and print the coverage report") coverage: python - @pyenv exec tox --parallel -qe 'tests,py{311}-tests,coverage' + @pyenv exec tox --parallel -qe 'tests,py{311,310,39}-tests,coverage' .PHONY: functests $(call help,make functests,"run the functional tests in Python 3.12") @@ -58,11 +68,21 @@ $(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: sure $(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{311}-tests,coverage,functests,py{311}-functests' + @pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{311,310,39}-tests,coverage,functests,py{311,310,39}-functests' .PHONY: template $(call help,make template,"update from the latest cookiecutter template") diff --git a/README.md b/README.md index ebabf3c..4b081b4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - + diff --git a/bin/make_python b/bin/make_python index 8c5ef40..c4a1150 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.12.3 3.11.6; do +for python_version in 3.12.4 3.11.9 3.10.14 3.9.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/setup.cfg b/setup.cfg index ec7c6c0..9a78aa0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ classifiers = package_dir = = src packages = find: -python_requires = >=3.11 +python_requires = >=3.9 install_requires = [options.packages.find] diff --git a/tox.ini b/tox.ini index d319d6e..4869aea 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,7 @@ deps = lint,template: cookiecutter typecheck: mypy depends = - coverage: tests,py{311}-tests + coverage: tests,py{311,310,39}-tests commands = dev: {posargs:ipython --classic --no-banner --no-confirm-exit} format: black src tests bin