From 8bf5329b0bc37f673e2c22784f602a7e3aac34e7 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sat, 8 Nov 2025 00:22:35 -0800 Subject: [PATCH 1/5] As I was making this change, and adapting the mypy codebase to include some new stubs, I realized that the requirements.txt files tell you to run pip-compile --output-file=test-requirements.txt --strip-extras --allow-unsafe test-requirements.in, and thus have an implicit undeclared requirement on pip-tools. I tried adding this to build-requirements.txt but that broke some things so I put it in a new extra called dev instead. --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0de739be9b55..b609ac233969 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,10 @@ python2 = [] reports = ["lxml"] install-types = ["pip"] faster-cache = ["orjson"] +dev = [ + "pip-tools", # Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.) + "pip<24.3" # Needed to update the requirement files correctly with pip-tools ay ay ay https://github.com/jazzband/pip-tools/issues/2131 +] [project.urls] Homepage = "https://www.mypy-lang.org/" From 696114b6efbe3a78aeefc413e05db25078bf22ad Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sat, 8 Nov 2025 00:25:12 -0800 Subject: [PATCH 2/5] later, they fixed the pip thing --- pyproject.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b609ac233969..174a96e32328 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,10 +65,8 @@ python2 = [] reports = ["lxml"] install-types = ["pip"] faster-cache = ["orjson"] -dev = [ - "pip-tools", # Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.) - "pip<24.3" # Needed to update the requirement files correctly with pip-tools ay ay ay https://github.com/jazzband/pip-tools/issues/2131 -] +# Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.): +dev = ["pip-tools>=7.5.1"] [project.urls] Homepage = "https://www.mypy-lang.org/" From 63f203c4c9c2c20677a5a0716af3e3e34a460790 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sat, 8 Nov 2025 00:34:58 -0800 Subject: [PATCH 3/5] another pip problem --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 174a96e32328..f9fa6f6b80c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,10 @@ reports = ["lxml"] install-types = ["pip"] faster-cache = ["orjson"] # Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.): -dev = ["pip-tools>=7.5.1"] +dev = [ + "pip-tools>=7.5.1", + "pip<25.3", # workaround for this problem until its fix gets released: https://github.com/jazzband/pip-tools/pull/2253 +] [project.urls] Homepage = "https://www.mypy-lang.org/" From c5ed9458fa913fadd252dc841d8fdb3cd06191e5 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sat, 8 Nov 2025 13:10:40 -0800 Subject: [PATCH 4/5] switch to dependency-group --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f9fa6f6b80c0..05084bfa6fae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,8 +65,10 @@ python2 = [] reports = ["lxml"] install-types = ["pip"] faster-cache = ["orjson"] -# Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.): + +[dependency-groups] dev = [ + # Not strictly needed for building per se, but pip-compile from this package is needed if you want to update the requirement files. (Word on the street is you can also use uv pip compile instead.): "pip-tools>=7.5.1", "pip<25.3", # workaround for this problem until its fix gets released: https://github.com/jazzband/pip-tools/pull/2253 ] From ab8040c31989c4c26d22df0bec030dc56cfc737e Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sat, 8 Nov 2025 13:16:44 -0800 Subject: [PATCH 5/5] add pip install group dev to the contributing instructions --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d7dd2d1e886..d95e3d349204 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,6 +46,7 @@ python -m venv venv ```bash python -m pip install -r test-requirements.txt +python -m pip install --group dev python -m pip install -e . hash -r # This resets shell PATH cache, not necessary on Windows ```