diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30cb80472..2744986e6 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 }} @@ -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 @@ -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 @@ -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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ee291d64..3332e9733 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 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 750210837..8de7843d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,4 +27,4 @@ split-on-trailing-comma = false extra-standard-library = ["_typeshed"] [build-system] -requires = ["setuptools<64", "wheel"] +requires = ["setuptools", "wheel"] diff --git a/setup.py b/setup.py index 511379cc8..982cc657b 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", ],