-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uv lock replacing all source registry URLs in uv.lock to the private registry #8262
Comments
I'm not sure if #7481 would fix the issue, but it seems that the features/fixes on that PR were not released yet. Sorry for the direct ping @charliermarsh but would you know anything about it? |
Are those packages available on your private registry? We prioritize the extra index URLs over the index URL, so I think it's correct to use those URLs instead. |
@charliermarsh wow that was fast, thank you! So I'm not sure. The
The in addition makes me think that it will only use it after looking for the packages in the Ideally the
There we can see that |
The priority is the order way around -- see here: https://docs.astral.sh/uv/pip/compatibility/#packages-that-exist-on-multiple-indexes. If you provide more indexes then, we'll re-do the resolution following those rules, and end up selecting the internally-available versions. What are you trying to do exactly? Why would you want to prefer PyPI over your internal index? |
I think my confusion is more on why this started happening. Previously if I run A scenario for this would be when the private registry is under maintenance or having any issues. With this all other packages that by default are from |
I don't think the behavior here has changed recently. Did you see different behavior in a prior version of uv? If so, do you know which version? It doesn't quite make sense to use the PyPI registry if your private registry is mirroring everything. If you want to use PyPI for all non-private packages, I think you should probably disable PyPI mirroring? |
Before I started the migration from poetry to uv using uv version 0.4.10. The current |
I have a similar problem. In CI I have set I might be missing something in the docs, but what I would like to be able to do is the following: Allow a uv.lock file to be generated with URLs pointing to PyPI and sync from that in CI while using an internal mirror. The mirror is here for faster downloads and to not put more strain on PyPI, it is not used to serve private packages. EDIT:// pdm (which we were using before) has the nice possibility of not putting the whole URL into the lockfile https://pdm-project.org/latest/usage/lockfile/#static-urls |
Related discussion on that in #6349 |
Current uv platform: macOS 14.6.1 (23G93)
Current uv version: uv 0.4.22 (34be3af 2024-10-15)
Hi team, first of all thank you for all the hard work on this project! Also let me know if there's an issue already covering this. I tried to search but couldn't find anything.
Right now I'm having an issue which out of nowhere
uv lock
updates theuv.lock
not only with the data for a new package added, but actually it's replacing all the source registry URL from"https://pypi.org/simple"
to our private registry. Here's our configuration onpyproject.toml
:After running
uv lock --extra-index-url=https://<ommited-registry>/$ENV/org/pip/python/index/ --extra-index-url= https://<ommited-registry>/$ENV/org/pip-test/python/index/
theuv.lock
has now replaced all registry fromhttps://pypi.org/simple
to our private registry.I'm really confused because I haven't see this happening before. Any ideas on what's happening and how to fix it?
The text was updated successfully, but these errors were encountered: