fix: honor _fresh installs with the uv installer - #1179
Conversation
Pip maps _fresh to --ignore-installed so CLI and project_wheel_metadata reinstall into the isolated env when PYTHONPATH is preset. The uv backend accepted _fresh but never forwarded it, so those installs could reuse already-present packages. Pass uv pip install --reinstall instead.
734e7da to
5972ab2
Compare
|
Please provide evidence that uv is impacted by the same issue. |
|
FYI, I was suspicious too that this was valid, and ran a check with Claude: 🤖 AI text below 🤖 No, the PR fixes a bug that does not exist, and the two flags are not equivalent. The premise is wrong. The reason pip needs The flags differ in semantics:
Recommendation: close the PR or ask for a reproducer. If a reproducer surfaces, the right uv analogue would be to look at why |
|
I don't have a uv reproducer. |
Description
--installer uvignored_fresh=True. Pip maps that flag to--ignore-installedso the CLI andproject_wheel_metadatareinstall build requirements whenPYTHONPATHis preset. The uv backend accepted_freshbut never forwarded it.Pass
uv pip install --reinstallin that case, matching pip's behavior.Changelog
docs/changelog/1179.bugfix.rstChecklist
uv run pytest tests/test_env.py::test_uv_impl_install_cmd_well_formed tests/test_env.py::test_default_impl_install_cmd_well_formed— 24 passed)ruff check/ruff format --check)