Skip to content

Commit b9e6356

Browse files
authored
Add Python 3.12 support (#802)
* Add Python 3.12 support * Use shutil in tests after deprecating distutils in python 3.12
1 parent c286019 commit b9e6356

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
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', 'pypy-3.10']
12+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.10']
1313
django-version: ['3.2', '4.1', '4.2', 'main']
1414
exclude:
1515
- python-version: '3.8'
@@ -28,6 +28,10 @@ jobs:
2828
django-version: '3.2'
2929
- python-version: '3.11'
3030
django-version: '3.2'
31+
- python-version: '3.12'
32+
django-version: '3.2'
33+
- python-version: '3.12'
34+
django-version: '4.1'
3135

3236
steps:
3337
- uses: actions/checkout@v3

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Unreleased
88
* Use Pypy 3.10
99
* Drop support for Python 3.7
1010
* Drop support for Django 2
11+
* Add Python 3.12 support
1112

1213
2.1.0
1314
=====

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"Programming Language :: Python :: 3.9",
3737
"Programming Language :: Python :: 3.10",
3838
"Programming Language :: Python :: 3.11",
39+
"Programming Language :: Python :: 3.12",
3940
"Programming Language :: Python :: Implementation :: PyPy",
4041
"Topic :: Utilities",
4142
"Topic :: Software Development :: Libraries :: Python Modules",

tests/settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import distutils.spawn
21
import glob
32
import os
3+
import shutil
44

55

66
def local_path(path):
@@ -142,9 +142,9 @@ def local_path(path):
142142

143143
NODE_MODULES_PATH = local_path("../node_modules")
144144
NODE_BIN_PATH = os.path.join(NODE_MODULES_PATH, ".bin")
145-
NODE_EXE_PATH = distutils.spawn.find_executable("node")
146-
JAVA_EXE_PATH = distutils.spawn.find_executable("java")
147-
CSSTIDY_EXE_PATH = distutils.spawn.find_executable("csstidy")
145+
NODE_EXE_PATH = shutil.which("node")
146+
JAVA_EXE_PATH = shutil.which("java")
147+
CSSTIDY_EXE_PATH = shutil.which("csstidy")
148148
HAS_NODE = bool(NODE_EXE_PATH)
149149
HAS_JAVA = bool(JAVA_EXE_PATH)
150150
HAS_CSSTIDY = bool(CSSTIDY_EXE_PATH)

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ envlist =
33
pypy3-dj{32,41,42}
44
py{38,39,310,311}-dj32
55
py{39,310,311}-dj{41,42,main}
6+
py{312}-dj{42,main}
67
docs
78

89
[gh-actions]
@@ -11,6 +12,7 @@ python =
1112
3.9: py39
1213
3.10: py310
1314
3.11: py311
15+
3.12: py312
1416
pypy3: pypy3
1517

1618
[gh-actions:env]
@@ -27,6 +29,7 @@ basepython =
2729
py39: python3.9
2830
py310: python3.10
2931
py311: python3.11
32+
py312: python3.12
3033
deps =
3134
pypy3: mock
3235
dj32: Django>=3.2,<3.3

0 commit comments

Comments
 (0)