Skip to content

Commit aedee3e

Browse files
authored
Merge pull request #714 from willkg/710-python312
Add support for python 3.12 (#710)
2 parents 39451b4 + 3ec5016 commit aedee3e

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"]
1313
os: [ubuntu-latest, macos-latest, windows-latest]
1414

1515
steps:

requirements-dev.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
-e .
22

3-
black==22.12.0; implementation_name == 'cpython'
4-
build==0.10.0
5-
mypy==0.991; implementation_name =='cpython'
6-
pytest==7.2.1
7-
tox==4.3.5
8-
tox-gh-actions==3.0.0
3+
black==23.9.1; implementation_name == 'cpython'
4+
build==1.0.3
5+
mypy==1.5.1; implementation_name =='cpython'
6+
pytest==7.4.2
7+
setuptools==68.2.2
8+
tox==4.11.3
9+
tox-gh-actions==3.1.3
910
twine==4.0.2
10-
wheel==0.38.4
11+
wheel==0.41.2
1112

1213
# NOTE(willkg): Held back until we drop support for Python 3.7
1314
Sphinx==5.3.0

tests/test_parse_shim.py

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ class ParseResult:
9595
],
9696
)
9797
def test_urlparse(uri, expected):
98-
9998
if inspect.isclass(expected) and issubclass(expected, BaseException):
10099
with pytest.raises(expected):
101100
urlparse(uri)

tests_website/server.py

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121

2222
class BleachCleanHandler(http.server.SimpleHTTPRequestHandler):
23-
2423
# Prevent 'cannot bind to address' errors on restart
2524
allow_reuse_address = True
2625

tox.ini

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[tox]
44
envlist =
5-
py{38,39,310,311,py3}
6-
py{38,39,310,311,py3}-tinycss2
7-
py{38,39,310,311}-build-no-lang
5+
py{38,39,310,311,312,py3}
6+
py{38,39,310,311,312,py3}-tinycss2
7+
py{38,39,310,311,312}-build-no-lang
88
py39-docs
99
py39-format-check
1010
py39-lint
@@ -16,6 +16,7 @@ python =
1616
3.9: py39
1717
3.10: py310
1818
3.11: py311
19+
3.12: py312
1920
pypy-3.8: pypy3
2021

2122
[testenv]
@@ -48,6 +49,12 @@ extras = css
4849
commands =
4950
pytest {posargs:-v}
5051

52+
[testenv:py312-tinycss2]
53+
deps = -rrequirements-dev.txt
54+
extras = css
55+
commands =
56+
pytest {posargs:-v}
57+
5158
[testenv:pypy3-tinycss2]
5259
deps = -rrequirements-dev.txt
5360
extras = css
@@ -78,6 +85,12 @@ setenv =
7885
commands =
7986
python setup.py build
8087

88+
[testenv:py312-build-no-lang]
89+
setenv =
90+
LANG=
91+
commands =
92+
python setup.py build
93+
8194
[testenv:py39-lint]
8295
changedir = {toxinidir}
8396
deps = -rrequirements-flake8.txt

0 commit comments

Comments
 (0)