From e8362187ed91c29504741beeacb22840b5382f9a Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 29 Nov 2025 18:43:45 +0200 Subject: [PATCH 1/8] Renovate: mypy updates to widen accepted version range --- .github/renovate.json | 4 ++++ pyproject.toml | 1 - uv.lock | 4 ---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index d9bc0341c..aaf386a62 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -9,5 +9,9 @@ "automergeSchedule": ["* * * * 2"] }, "packageRules": [ + { + "matchPackageNames": ["mypy"], + "rangeStrategy": "widen" + } ] } diff --git a/pyproject.toml b/pyproject.toml index dad5f157d..6401d10c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,6 @@ tests = [ "jinja2==3.1.6", "pyyaml==6.0.3", # typing: - "mypy==1.19.0", "django-stubs[compatible-mypy,oracle,redis]", ] pyright = [ diff --git a/uv.lock b/uv.lock index 111b407af..7138e12f7 100644 --- a/uv.lock +++ b/uv.lock @@ -246,7 +246,6 @@ dev = [ { name = "django" }, { name = "django-stubs", extra = ["compatible-mypy", "oracle", "redis"] }, { name = "jinja2" }, - { name = "mypy" }, { name = "mysqlclient" }, { name = "psycopg2-binary" }, { name = "pyrefly" }, @@ -267,7 +266,6 @@ tests = [ { name = "django" }, { name = "django-stubs", extra = ["compatible-mypy", "oracle", "redis"] }, { name = "jinja2" }, - { name = "mypy" }, { name = "mysqlclient" }, { name = "psycopg2-binary" }, { name = "pytest" }, @@ -296,7 +294,6 @@ dev = [ { name = "django", specifier = "==5.2.8" }, { name = "django-stubs", extras = ["compatible-mypy", "oracle", "redis"], editable = "." }, { name = "jinja2", specifier = "==3.1.6" }, - { name = "mypy", specifier = "==1.19.0" }, { name = "mysqlclient", specifier = "==2.2.7" }, { name = "psycopg2-binary", specifier = "==2.9.11" }, { name = "pyrefly", specifier = "==0.43.1" }, @@ -313,7 +310,6 @@ tests = [ { name = "django", specifier = "==5.2.8" }, { name = "django-stubs", extras = ["compatible-mypy", "oracle", "redis"], editable = "." }, { name = "jinja2", specifier = "==3.1.6" }, - { name = "mypy", specifier = "==1.19.0" }, { name = "mysqlclient", specifier = "==2.2.7" }, { name = "psycopg2-binary", specifier = "==2.9.11" }, { name = "pytest", specifier = "==9.0.1" }, From 04dc28134859f5174a4cea5bcf40acf60fa6ad56 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 29 Nov 2025 19:03:29 +0200 Subject: [PATCH 2/8] attempt to fix mypy_primer --- .github/workflows/mypy_primer.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index fc38cf3a3..40a954c82 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -24,16 +24,17 @@ jobs: with: path: django-stubs_to_test fetch-depth: 0 - - uses: actions/setup-python@v6 + - name: Install uv & Python + uses: astral-sh/setup-uv@v7 with: python-version: "3.12" - name: Install dependencies - run: pip install git+https://github.com/hauntsaninja/mypy_primer.git + run: uv pip install git+https://github.com/hauntsaninja/mypy_primer.git - name: Run mypy_primer shell: bash run: | cd django-stubs_to_test - MYPY_VERSION=$(grep mypy== pyproject.toml | sed -n 's/ "mypy==\([^;]*\).*",/\1/p') + MYPY_VERSION=$(uv tree --package=mypy --depth=0 -q | sed -n 's/ "mypy v\([^;]*\).*",/\1/p') echo "new commit" git checkout $GITHUB_SHA From ba0ccb9ac76a7a6f4aefdf15026d1a6b7c7f4550 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 29 Nov 2025 19:04:27 +0200 Subject: [PATCH 3/8] try this --- .github/workflows/mypy_primer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 40a954c82..e924db1a2 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -29,7 +29,7 @@ jobs: with: python-version: "3.12" - name: Install dependencies - run: uv pip install git+https://github.com/hauntsaninja/mypy_primer.git + run: pip install git+https://github.com/hauntsaninja/mypy_primer.git - name: Run mypy_primer shell: bash run: | From a8e152867020a7eba564a125d0bf2dc25d8c4134 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 29 Nov 2025 19:11:25 +0200 Subject: [PATCH 4/8] try again --- .github/workflows/mypy_primer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index e924db1a2..55bf69bf6 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -34,7 +34,7 @@ jobs: shell: bash run: | cd django-stubs_to_test - MYPY_VERSION=$(uv tree --package=mypy --depth=0 -q | sed -n 's/ "mypy v\([^;]*\).*",/\1/p') + MYPY_VERSION=$(uv tree --package=mypy --depth=0 -q | sed -n 's/^mypy v\(.\+\)$/\1/p') echo "new commit" git checkout $GITHUB_SHA From 9c3537d64f7e9df7f206b25e95fda0c0651699f1 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Thu, 4 Dec 2025 00:09:37 +0200 Subject: [PATCH 5/8] Restore actions/setup-python --- .github/workflows/mypy_primer.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 55bf69bf6..52aac1fab 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -24,10 +24,11 @@ jobs: with: path: django-stubs_to_test fetch-depth: 0 - - name: Install uv & Python - uses: astral-sh/setup-uv@v7 + - uses: actions/setup-python@v6 with: python-version: "3.12" + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Install dependencies run: pip install git+https://github.com/hauntsaninja/mypy_primer.git - name: Run mypy_primer From 7efdb78a4ac5b4c000966b6065b28e4cc1068c36 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Thu, 4 Dec 2025 00:13:51 +0200 Subject: [PATCH 6/8] Try 'uv pip install' --- .github/workflows/mypy_primer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 52aac1fab..1fce6e714 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -30,7 +30,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 - name: Install dependencies - run: pip install git+https://github.com/hauntsaninja/mypy_primer.git + run: uv pip install git+https://github.com/hauntsaninja/mypy_primer.git - name: Run mypy_primer shell: bash run: | From bc89fc7e49f9fb549c1e8e67da88586938d7e653 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Thu, 4 Dec 2025 00:15:37 +0200 Subject: [PATCH 7/8] Fix 'uv pip install' --- .github/workflows/mypy_primer.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 1fce6e714..cc7b7ddf2 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -30,7 +30,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 - name: Install dependencies - run: uv pip install git+https://github.com/hauntsaninja/mypy_primer.git + run: | + uv venv + uv pip install git+https://github.com/hauntsaninja/mypy_primer.git - name: Run mypy_primer shell: bash run: | From cfe9d2c543eb766608aceecc0ed51b4b54bcd696 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Thu, 4 Dec 2025 00:17:08 +0200 Subject: [PATCH 8/8] Fix 'uv pip install' --- .github/workflows/mypy_primer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index cc7b7ddf2..263119aa2 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -54,7 +54,7 @@ jobs: cd .. # fail action if exit code isn't zero or one ( - mypy_primer \ + uv run mypy_primer \ --new v${MYPY_VERSION} --old v${MYPY_VERSION} \ --known-dependency-selector django-stubs \ --old-prepend-path django-stubs_base --new-prepend-path django-stubs_to_test \