diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3be2b41d9..3efae77ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,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'] fail-fast: false steps: - uses: actions/checkout@v4 @@ -31,7 +31,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_django_plugin @@ -48,7 +48,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'] shard: [0, 1, 2, 3] fail-fast: false steps: @@ -64,7 +64,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 # Must match `shard` definition in the test matrix: - name: Run tests @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11'] + python-version: ['3.12'] fail-fast: false steps: - uses: actions/checkout@v4 @@ -90,7 +90,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 stubtest run: bash ./scripts/stubtest.sh @@ -101,10 +101,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11'] django-version: ['3.2', '4.2'] include: - - python-version: '3.11' + - python-version: '3.12' django-version: '4.1' steps: - uses: actions/checkout@v4 @@ -119,7 +119,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 pip install "Django==${{ matrix.django-version }}" pip check diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b135d481..8e2993c8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +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.11 + 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 23ff780de..4d4089ea1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,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: @@ -88,7 +88,7 @@ We have two special files to allow errors: You might also want to disable `incremental` mode while working on `stubtest` changes. This mode leads to several known problems (stubs do not show up or have strange errors). -**Important**: right now we only run `stubtest` on Python 3.11 (because it is the latest released version at the moment), any other versions might generate different outputs. Any work to create per-version allowlists is welcome. +**Important**: right now we only run `stubtest` on Python 3.12 (because it is the latest released version at the moment), any other versions might generate different outputs. Any work to create per-version allowlists is welcome. ## Submission Guidelines diff --git a/README.md b/README.md index c2241fd43..87ec49048 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ We rely on different `django` and `mypy` versions: | django-stubs | Mypy version | Django version | Django partial support | Python version | |----------------|--------------|----------------|------------------------|----------------| +| (next release) | 1.5.x | 4.2 | 4.1, 3.2 | 3.8 - 3.12 | | 4.2.4 | 1.5.x | 4.2 | 4.1, 3.2 | 3.8 - 3.11 | | 4.2.3 | 1.4.x | 4.2 | 4.1, 3.2 | 3.8 - 3.11 | | 4.2.2 | 1.4.x | 4.2 | 4.1, 3.2 | 3.8 - 3.11 | diff --git a/ext/setup.py b/ext/setup.py index b7662622b..7a730d474 100755 --- a/ext/setup.py +++ b/ext/setup.py @@ -38,6 +38,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", "Framework :: Django", "Framework :: Django :: 3.2", diff --git a/pyproject.toml b/pyproject.toml index 305c8d865..510a37bf1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,4 +32,4 @@ known-first-party = ["django_stubs_ext", "mypy_django_plugin"] split-on-trailing-comma = false [build-system] -requires = ["setuptools<64", "wheel"] +requires = ["setuptools", "wheel"] diff --git a/setup.py b/setup.py index 76aa663b0..34b1af6f0 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,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", "Framework :: Django :: 3.2",