uv
uv copied to clipboard
Request to enable `uv.lock` to not include the index url
Hello team,
Many thanks for the awesome work you're doing, and the countless amounts of time you've saved everyone using uv
(and ruff
).
I've seen the recent blog post about 0.3.0 and the accompanying documentation update, and from playing a bit to test commands like uv lock
and uv sync
, I actually have a question about uv.lock
.
I've described the setup I use in https://github.com/astral-sh/uv/issues/1710 (a proxy, and using invoke
, etc.). That setup means that on different team member's machine's, each is likely to have a different INDEX_URL
and even the CI/CD system we use would have a different one.
I've generated the uv.lock
file using UV_INDEX_URL=... uv lock
, and the main thing I noticed is that the index url is included in the lock file e.g.
[[package]]
name = "aws-embedded-metrics"
version = "3.2.0"
source = { registry = "http://<omitted>/pypi/simple" }
dependencies = [
{ name = "aiohttp" },
]
sdist = { url = "http://<omitted>/pypi/simple/aws-embedded-metrics/3.2.0/aws-embedded-metrics-3.2.0.tar.gz", hash = "sha256:f235f87ab25ff328f6f3afca1c6b3218e81eea6e96e6aee012d368bb813fae7b" }
wheels = [
{ url = "http://<omitted>/pypi/simple/aws-embedded-metrics/3.2.0/aws_embedded_metrics-3.2.0-py3-none-any.whl", hash = "sha256:887b76d24914efa5fc42a7b77983e77fc670633e6e1195aac7653c425fee7399" },
]
I have not tried using that file across our different machines yet, but I suspect it's going to cause problems so I wanted to confirm with you folks
- What would happen if the index in the lock file is not available, and
UV_INDEX_URL
? - Is there a way to not include the full index url in the lock file?