uv: uv breaks with --extra-index-url on latest version

Summary

We used to run uv pip install -r requirements-dev.txt daft --pre --extra-index-url https://d1p3klp2t5517h.cloudfront.net/builds/nightly --force-reinstall in our nightly CI with no issue. For the past few days this results in

  × No solution found when resolving dependencies:
  ╰─▶ Because httpx was not found in the package registry and you require httpx==0.27.2, we can conclude that your requirements are unsatisfiable.

      hint: An index URL (https://d1p3klp2t5517h.cloudfront.net/builds/nightly) could not be queried due to a lack of valid authentication credentials (403 Forbidden).

Possibly because it’s trying to resolve httpx from our extra index instead of pypi

Platform

Ubuntu 24.04, Darwin 22.3.0 arm64

Version

uv 0.7.2

Python version

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 22 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for sharing these! This difference is what I would expect to see after the upgrade to 0.7. uv no longer ignores 403s by default.

The first question is if the credentials have the correct permissions. If they do, then it’s possible a JFrog configuration is causing it to return 403s even when permissions are correct. In that case, you can configure the index in pyproject.toml to ignore 403s with ignore-error-codes = [403].

Commands

command -v uv || pip install uv==0.7.0
uv venv
export UV_EXTRA_INDEX_URL=https://${JFROG_USERNAME}:${JFROG_ACCESS_TOKEN}@foobar.jfrog.io/artifactory/api/pypi/pypi/simple
uv pip install -vv aioboto3


Trace logs in failing case, run in CICD.

Creating virtual environment at: .venv
DEBUG uv 0.7.0
DEBUG Searching for default Python interpreter in virtual environments
TRACE Querying interpreter executable at /codefresh/volume/foobar/.venv/bin/python3
DEBUG Found `cpython-3.12.10-linux-x86_64-gnu` at `/codefresh/volume/foobar/.venv/bin/python3` (virtual environment)
DEBUG Using Python 3.12.10 environment at: .venv
TRACE Checking lock for `.venv` at `.venv/.lock`
DEBUG Acquired lock for `.venv`
DEBUG At least one requirement is not satisfied: aioboto3
TRACE Caching credentials for https://****:****@foobar.jfrog.io/artifactory/api/pypi/pypi/simple
TRACE Caching credentials for https://****:****@foobar.jfrog.io/artifactory/api/pypi/pypi
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.12.10
DEBUG Solving with target Python version: >=3.12.10
TRACE Assigned packages:
TRACE Chose package for decision: root. remaining choices:
DEBUG Adding direct dependency: aioboto3*
TRACE Assigned packages: root==0a0.dev0
TRACE Chose package for decision: aioboto3. remaining choices:
TRACE Fetching metadata for aioboto3 from https://****:****@foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/
 for /root/.cache/uv/simple-v15/index/7166f2fb68f9a269/aioboto3.rkyv
ttps://foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/
uest for https://foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/
https://****:****@foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/ with authentication policy auto
***:****@foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/ already contains username and password
TRACE Considering retry of error: Error { kind: WrappedReqwestError(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("foobar.jfrog.io")), port: None, path: "/artifactory/api/pypi/pypi/simple/aioboto3/", query: None, fragment: None }, WrappedReqwestError(Reqwest(reqwest::Error { kind: Status(403), url: "https://foobar.jfrog.io/artifactory/api/pypi/pypi/simple/aioboto3/" }))) }
TRACE Cannot retry error: not an IO error
DEBUG Indexes search failed because of status code failure: 403 Forbidden
TRACE Received package metadata for: aioboto3
DEBUG Searching for a compatible version of aioboto3 (*)
TRACE Selecting candidate for aioboto3 with range * with 0 remote versions
DEBUG No compatible version found for: aioboto3
TRACE Resolver derivation tree before reduction
term root==0a0.dev0
  root==0a0.dev0 depends on aioboto3*
  aioboto3 not found in the package registry
TRACE Resolver derivation tree after reduction
term root==0a0.dev0
  root==0a0.dev0 depends on aioboto3*
  aioboto3 not found in the package registry
  × No solution found when resolving dependencies:
  ╰─▶ Because aioboto3 was not found in the package registry and you require
      aioboto3, we can conclude that your requirements are unsatisfiable.

      hint: An index URL
      (https://foobar.jfrog.io/artifactory/api/pypi/pypi/simple) could
      not be queried due to a lack of valid authentication credentials (403
      Forbidden).
DEBUG Released lock at `/codefresh/volume/foobar/.venv/.lock`


The traces in the passing case are much longer and I need to do some fanagling to get it out of our CICD without truncation.