uv: Failure to download packages from Azure Artifacts starting version 0.7.0
Summary
Starting with UV 0.7.0 just today, I can no longer download packages from Azure Artifacts. Error:
uv sync
Resolved 382 packages in 0.74ms
× Failed to download `my-private-pkg==4.0.0`
├─▶ Failed to extract archive: my_private_pkg-4.0.0-py3-none-any.whl
├─▶ an upstream reader returned an error: unexpected end of file
╰─▶ unexpected end of file
In the verbose logs I see the following which might be relevant:
TRACE Cached response https://pkgs.dev.azure.com/XXXXXX/_packaging/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX/pypi/download/my-private-pkg/4/my_private_pkg-4.0.0-py3-none-any.whl is not storable because it does not meet any of the necessary criteria (e.g., it doesn't have an 'Expires' header set or a 'max-age' cache-control directive)
TRACE Considering retry of error: Extract("my_private_pkg-4.0.0-py3-none-any.whl", AsyncZip(UpstreamReadError(Kind(UnexpectedEof))))
TRACE Retrying error: `ConnectionReset` or `UnexpectedEof`
DEBUG Transient failure while handling response from https://pkgs.dev.azure.com/XXXXXX/_packaging/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX/pypi/download/my-private-pkg/4/my_private_pkg-4.0.0-py3-none-any.whl; retrying...
These are the relevant portions of my pyproject.toml file:
dependencies = [
"my-private-pkg>=4.0",
...
]
[tool.uv.sources]
my-private-pkg = { index = "azure" }
...
[[tool.uv.index]]
name = "azure"
url = "https://pkgs.dev.azure.com/XXXXXX/_packaging/XXXXXX/pypi/simple"
Platform
Ubuntu 24.04 amd64
Version
uv 0.7.0
Python version
Python 3.12.3
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 28 (16 by maintainers)
Commits related to this issue
- Revert fix handling of authentication when encountering redirects (#13215) These changes to redirect handling appear to have caused #13208. This PR reverts the redirect changes to give us time to inv... — committed to astral-sh/uv by jtfmumm 2 years ago
- Properly handle authentication when encountering redirects (#13595) This is mostly restoring #13215. It also includes a one-line fix for #13208 (which resulted from that PR). In particular, Azure was... — committed to astral-sh/uv by jtfmumm a year ago
- Properly handle authentication when encountering redirects (#13595) This is mostly restoring #13215. It also includes a one-line fix for #13208 (which resulted from that PR). In particular, Azure was... — committed to astral-sh/uv by jtfmumm a year ago
- Properly handle authentication when encountering redirects (#13595) This is mostly restoring #13215. It also includes a one-line fix for #13208 (which resulted from that PR). In particular, Azure was... — committed to astral-sh/uv by jtfmumm a year ago
- Properly handle authentication when encountering redirects (#13595) This is mostly restoring #13215. It also includes a one-line fix for #13208 (which resulted from that PR). In particular, Azure was... — committed to astral-sh/uv by jtfmumm a year ago
0.7.1is now available with this fix.I’m able to replicate this issue and verified that it occurs with 0.7.0 and not 0.6.17. Investigating now.
Fix in
0.7.1works for me!Version
0.6.17worked fine. Version0.7.0failed before lunch, and0.7.1works after lunch! Super thanks for the fast fix @jtfmumm !We’ll track rolling this change back out (with a fix for this case) in https://github.com/astral-sh/uv/issues/13255
+1, with self-hosted pypi + hatchling as build system it leads to:
For anyone googling by trace above:
pip install uv==0.6.17until fix will be released.@jtfmumm will do
I’m pretty certain this is because of changes to redirect handling. I’m going to revert those changes to address this problem while investigating.