Open casellimarco opened 1 month ago
Unfortunately I can't really do much with this -- it does work as described for me. Here's a concrete example:
echo "anyio==4.4.0" | uv pip compile --extra-index-url https://test.pypi.org/simple - --index-strategy unsafe-best-match
(anyio
only exists at 3.5.0 on the Test PyPI index.)
Scenario
I want to install the package
PACKAGE
. The package is present both on the global pypi, the default index-url, and in another extra-index-urlEXTRA_INDEX_URL
, but the specific versionVERSION_ONLY_ON_PYPI
is present only on the global pypi.Theoretically, the extra_index_url would not be needed for this particular package, but since this is part of dependencies installation it is installed with many others packages through a requirements.txt file and for some of them the
EXTRA_INDEX_URL
is required.When I try to install it with the command
uv pip install PACKAGE==VERSION_ONLY_ON_PYPI --extra-index-url EXTRA_INDEX_URL --index-strategy unsafe-best-match --verbose
I get something like
To my understanding
unsafe-best-match
should look for all the versions in all the index-url (so Pypi's one and EXTRA_INDEX_URL) but as soon it finds the package in EXTRA_INDEX_URL but not the correct version it bombs without looking further.Setup
Python 3.10.12, Ubuntu 22.04, UV 0.2.5