uv
uv copied to clipboard
Clearer output on index strategy, determined source index and indexes being queried for uv pip install <package>
Platform
➜ uname -a
Darwin FA-3620-MBPRO14 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
➜ uv --version
uv 0.2.11 (44041bccd 2024-06-11)
Issue
When running uv pip install for a given package (or multiple via -r requirements.txt in my case) it would be useful as an end-user for the determined source index for the given package to also be output as well as the indexes being queried.
➜ cat ~/.config/uv/uv.toml
[pip]
extra-index-url = ["https://private.index1/simple", "https://private.index2/simple", "https://pypi.python.org/simple"]
Initally my index list looked like this ^.
➜ uv pip install python-geohash
× No solution found when resolving dependencies:
╰─▶ Because only python-geohash==0.8.5 is available and python-geohash==0.8.5 has no wheels are available with a
matching Python ABI, we can conclude that all versions of python-geohash cannot be used.
And because you require python-geohash, we can conclude that the requirements are unsatisfiable.
No compatible package found since this would just be querying https://private.index1/simple but this wasn't obvious to me based on the output. Having this determined source index for this package output inline would have been helpful here, since I was uninformed of changes to index priority/behaviour in uv vs. pip.
➜ uv pip install python-geohash --index-strategy unsafe-best-match
Resolved 1 package in 794ms
Installed 1 package in 4ms
+ python-geohash==0.8.5
To replicate something close to pip's behaviour I used --index-strategy unsafe-best-match. Having the determined source index as well as the indexes that are being queried (for both unsafe index-strategies) would be useful here also. Similar to how pip install <package> will output:
Looking in indexes: https://private.index1/simple, https://private.index2/simple, https://pypi.python.org/simple
Collecting <package>
Downloading <index>/<package>
There was increased confusion around this issue due to being uninformed of the changes within uv vs. pip regarding priority of indexes and default index strategy. I had expected all indexes to be queried similar to pip's default behaviour but the output above lead me to believe I was experiencing an access/auth/compatibility resolution problem. IMO this would be a sensible addition to make these uv-specific changes clearer to end-users as well as reduce troubleshooting required for instances where package sources could be modified (e.g. overlapping config files, env vars added in pipeline processes etc.).
@wb9688: Yes, I'm sure about the missing option; I will post a screenshot this evening.
If you try it on a phone where the screen is "physically" small then 240 isn't so low.
@ale5000-git: It's low as in that my phone and the phone of 2 other people doesn't allow changing it to anywhere under 320 dp.
It is because the screen of your phone is bigger. Try on a phone with a screen of 122.40 x 64.20 mm and stock Android Lollipop.

@ale5000-git do you still have mentioned android 5.1.1 device ? if yes, can you confirm this small screens device's specific bug on latest version ?