From a07de944b676307b2919a01bd71f1c533210b8bd Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Wed, 4 Oct 2023 23:51:16 +0300 Subject: [PATCH 1/3] CI: Enable testing with Python 3.12 --- .github/workflows/test.yml | 4 ++-- setup.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30cb80472..8648c68df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Setup system dependencies diff --git a/setup.py b/setup.py index 3d0e94e75..bf33a321a 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ def find_stub_files(name: str) -> List[str]: "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", "Framework :: Django", ], From 263df2e2c2378211190bb43530b7db1735d70d74 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Fri, 6 Oct 2023 10:42:53 +0300 Subject: [PATCH 2/3] SETUPTOOLS_ENABLE_FEATURES=legacy-editable --- .github/workflows/test.yml | 4 ++-- CONTRIBUTING.md | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8648c68df..2744986e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | pip install -U pip setuptools wheel - pip install -r ./requirements.txt + SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt - name: Run mypy on plugin code run: mypy --strict mypy_drf_plugin - name: Run mypy on scripts and utils @@ -48,7 +48,7 @@ jobs: - name: Install dependencies run: | pip install -U pip setuptools wheel - pip install -r ./requirements.txt + SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt - name: Run tests run: pytest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0b8c2a33..f0c48d396 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,7 +46,7 @@ source .venv/bin/activate Then install the dev requirements: ```bash -pip install -r ./requirements.txt +SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt ``` Finally, install the pre-commit hooks: diff --git a/pyproject.toml b/pyproject.toml index 0bff68785..5772c8b5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,4 +26,4 @@ select = [ split-on-trailing-comma = false [build-system] -requires = ["setuptools<64", "wheel"] +requires = ["setuptools", "wheel"] From 5d2908a561f52026a8af72faef03a35a013a0870 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Fri, 6 Oct 2023 10:44:33 +0300 Subject: [PATCH 3/3] pre-commit default_language_version --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5402bc429..260597bf0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +default_language_version: + python: python3.12 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0