Skip to content

Commit 9881214

Browse files
authored
CI: Enable testing with Python 3.12 (#478)
* CI: Enable testing with Python 3.12 * SETUPTOOLS_ENABLE_FEATURES=legacy-editable * pre-commit default_language_version Need to use `SETUPTOOLS_ENABLE_FEATURES=legacy-editable` due to setuptools v64 changes: pypa/setuptools#3518
1 parent 89602d2 commit 9881214

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ['3.8', '3.9', '3.10', '3.11']
15+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
pip install -U pip setuptools wheel
25-
pip install -r ./requirements.txt
25+
SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt
2626
- name: Run mypy on plugin code
2727
run: mypy --strict mypy_drf_plugin
2828
- name: Run mypy on scripts and utils
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
strategy:
3636
matrix:
37-
python-version: ['3.8', '3.9', '3.10', '3.11']
37+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
3838
steps:
3939
- uses: actions/checkout@v4
4040
- name: Setup system dependencies
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install dependencies
4949
run: |
5050
pip install -U pip setuptools wheel
51-
pip install -r ./requirements.txt
51+
SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt
5252
5353
- name: Run tests
5454
run: pytest

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3+
default_language_version:
4+
python: python3.12
35
repos:
46
- repo: https://github.com/pre-commit/pre-commit-hooks
57
rev: v4.4.0

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ source .venv/bin/activate
4646
Then install the dev requirements:
4747

4848
```bash
49-
pip install -r ./requirements.txt
49+
SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt
5050
```
5151

5252
Finally, install the pre-commit hooks:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ split-on-trailing-comma = false
2727
extra-standard-library = ["_typeshed"]
2828

2929
[build-system]
30-
requires = ["setuptools<64", "wheel"]
30+
requires = ["setuptools", "wheel"]

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def find_stub_files(name: str) -> List[str]:
5959
"Programming Language :: Python :: 3.9",
6060
"Programming Language :: Python :: 3.10",
6161
"Programming Language :: Python :: 3.11",
62+
"Programming Language :: Python :: 3.12",
6263
"Typing :: Typed",
6364
"Framework :: Django",
6465
],

0 commit comments

Comments
 (0)