Skip to content

Commit 5df840f

Browse files
committed
Upgrade Python patch versions and add 3.12, 3.11, 3.10
1 parent e6a5499 commit 5df840f

File tree

7 files changed

+49
-16
lines changed

7 files changed

+49
-16
lines changed

.cookiecutter/cookiecutter.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"package_name": "h_assets",
1212
"slug": "h-assets",
1313
"short_description": "Pyramid views for serving collections of compiled static assets (eg. bundles of JavaScript and CSS).",
14-
"python_versions": "3.9.13,3.8.13",
14+
"python_versions": "3.12.4, 3.11.9, 3.10.14, 3.9.19, 3.8.19",
1515
"github_owner": "hypothesis",
1616
"copyright_holder": "Hypothesis",
1717
"visibility": "public",
@@ -25,4 +25,4 @@
2525
"__copyright_year": "2022",
2626
"pypi": "yes"
2727
}
28-
}
28+
}

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Python
2323
uses: actions/setup-python@v4
2424
with:
25-
python-version: '3.9'
25+
python-version: '3.12'
2626
- run: python -m pip install 'tox<4'
2727
- run: tox -e checkformatting
2828
Lint:
@@ -32,14 +32,14 @@ jobs:
3232
- name: Install Python
3333
uses: actions/setup-python@v4
3434
with:
35-
python-version: '3.9'
35+
python-version: '3.12'
3636
- run: python -m pip install 'tox<4'
3737
- run: tox -e lint
3838
Tests:
3939
runs-on: ubuntu-latest
4040
strategy:
4141
matrix:
42-
python-version: ['3.9', '3.8']
42+
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8']
4343
name: Unit tests with Python ${{ matrix.python-version }}
4444
steps:
4545
- uses: actions/checkout@v3
@@ -64,7 +64,7 @@ jobs:
6464
- name: Install Python
6565
uses: actions/setup-python@v4
6666
with:
67-
python-version: '3.9'
67+
python-version: '3.12'
6868
- name: Download coverage files
6969
uses: actions/download-artifact@v3
7070
with:
@@ -75,7 +75,7 @@ jobs:
7575
runs-on: ubuntu-latest
7676
strategy:
7777
matrix:
78-
python-version: ['3.9', '3.8']
78+
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8']
7979
name: Functional tests with Python ${{ matrix.python-version }}
8080
steps:
8181
- uses: actions/checkout@v3

.python-version

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
3.9.13
2-
3.8.13
1+
3.12.4
2+
3.11.9
3+
3.10.14
4+
3.9.19
5+
3.8.19

Makefile

+34-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,25 @@ checkformatting: python
3434
@pyenv exec tox -qe checkformatting
3535

3636
.PHONY: test
37-
$(call help,make test,"run the unit tests in Python 3.9")
37+
$(call help,make test,"run the unit tests in Python 3.12")
3838
test: python
3939
@pyenv exec tox -qe tests
4040

41+
.PHONY: test-py311
42+
$(call help,make test-py311,"run the unit tests in Python 3.11")
43+
test-py311: python
44+
@pyenv exec tox -qe py311-tests
45+
46+
.PHONY: test-py310
47+
$(call help,make test-py310,"run the unit tests in Python 3.10")
48+
test-py310: python
49+
@pyenv exec tox -qe py310-tests
50+
51+
.PHONY: test-py39
52+
$(call help,make test-py39,"run the unit tests in Python 3.9")
53+
test-py39: python
54+
@pyenv exec tox -qe py39-tests
55+
4156
.PHONY: test-py38
4257
$(call help,make test-py38,"run the unit tests in Python 3.8")
4358
test-py38: python
@@ -46,13 +61,28 @@ test-py38: python
4661
.PHONY: coverage
4762
$(call help,make coverage,"run the tests and print the coverage report")
4863
coverage: python
49-
@pyenv exec tox --parallel -qe 'tests,py{38}-tests,coverage'
64+
@pyenv exec tox --parallel -qe 'tests,py{311,310,39,38}-tests,coverage'
5065

5166
.PHONY: functests
52-
$(call help,make functests,"run the functional tests in Python 3.9")
67+
$(call help,make functests,"run the functional tests in Python 3.12")
5368
functests: python
5469
@pyenv exec tox -qe functests
5570

71+
.PHONY: functests-py311
72+
$(call help,make functests-py311,"run the functional tests in Python 3.11")
73+
functests-py311: python
74+
@pyenv exec tox -qe py311-functests
75+
76+
.PHONY: functests-py310
77+
$(call help,make functests-py310,"run the functional tests in Python 3.10")
78+
functests-py310: python
79+
@pyenv exec tox -qe py310-functests
80+
81+
.PHONY: functests-py39
82+
$(call help,make functests-py39,"run the functional tests in Python 3.9")
83+
functests-py39: python
84+
@pyenv exec tox -qe py39-functests
85+
5686
.PHONY: functests-py38
5787
$(call help,make functests-py38,"run the functional tests in Python 3.8")
5888
functests-py38: python
@@ -62,7 +92,7 @@ functests-py38: python
6292
$(call help,make sure,"make sure that the formatting$(comma) linting and tests all pass")
6393
sure: python
6494
sure:
65-
@pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{38}-tests,coverage,functests,py{38}-functests'
95+
@pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{311,310,39,38}-tests,coverage,functests,py{311,310,39,38}-functests'
6696

6797
.PHONY: template
6898
$(call help,make template,"update from the latest cookiecutter template")

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a href="https://github.com/hypothesis/h-assets/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/h-assets/ci.yml?branch=main"></a>
22
<a href="https://pypi.org/project/h-assets"><img src="https://img.shields.io/pypi/v/h-assets"></a>
3-
<a><img src="https://img.shields.io/badge/python-3.9 | 3.8-success"></a>
3+
<a><img src="https://img.shields.io/badge/python-3.12 | 3.11 | 3.10 | 3.9 | 3.8-success"></a>
44
<a href="https://github.com/hypothesis/h-assets/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
55
<a href="https://github.com/hypothesis/cookiecutters/tree/main/pypackage"><img src="https://img.shields.io/badge/cookiecutter-pypackage-success"></a>
66
<a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>

bin/make_python

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ -n "${CI+x}" ]; then exit; fi
88

99
pyenv_root=$(pyenv root)
1010

11-
for python_version in 3.9.13 3.8.13; do
11+
for python_version in 3.12.4 3.11.9 3.10.14 3.9.19 3.8.19; do
1212
bin_dir=$pyenv_root/versions/$python_version/bin
1313
if [ ! -f "$bin_dir"/tox ]; then
1414
pyenv install --skip-existing "$python_version"

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ deps =
4545
lint,template: cookiecutter
4646
typecheck: mypy
4747
depends =
48-
coverage: tests,py{38}-tests
48+
coverage: tests,py{311,310,39,38}-tests
4949
commands =
5050
dev: {posargs:ipython --classic --no-banner --no-confirm-exit}
5151
format: black src tests bin

0 commit comments

Comments
 (0)