Skip to content
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

No fallback on index-url if dependency not found in local simple repository #4540

Closed
BenediktMaag opened this issue Jun 26, 2024 · 1 comment · Fixed by #4545
Closed

No fallback on index-url if dependency not found in local simple repository #4540

BenediktMaag opened this issue Jun 26, 2024 · 1 comment · Fixed by #4545
Assignees
Labels
bug Something isn't working

Comments

@BenediktMaag
Copy link

I have setup a simple repository (https://packaging.python.org/en/latest/specifications/simple-repository-api/ | PEP503).

Installing a plugin from the repository by providing a extra-index-url works but when adding a dependency that is not contained in the repository uv errors instead of falling back to the index-url.

I know from #2083 that it should not continue looking if the specified verison was not found, but since no reference can be found it should continue with the primary index imo.

❯ : uv pip install cryptography --extra-index-url file:\C:\temp\simple\ -vv
0.000085s DEBUG uv uv 0.2.15
uv_requirements::specification::from_source source=cryptography
0.005378s DEBUG uv_toolchain::discovery Searching for Python interpreter in system toolchains
0.006771s DEBUG uv_toolchain::discovery Found cpython 3.12.0 at C:\temp\test_install\.venv\Scripts\python.exe (active virtual environment)
0.007211s DEBUG uv::commands::pip::install Using Python 3.12.0 environment at .venv\Scripts\python.exe
0.007755s DEBUG uv_fs Acquired lock for .venv
0.008958s DEBUG uv::commands::pip::install At least one requirement is not satisfied: cryptography
uv_client::linehaul::linehaul
0.009374s DEBUG uv_client::base_client Using request timeout of 30s
uv_resolver::flat_index::from_entries
uv_resolver::resolver::solve
uv_resolver::resolver::solve_tracked
0.012813s 0ms DEBUG uv_resolver::resolver Solving with installed Python version: 3.12.0
uv_resolver::resolver::choose_version package=root
uv_resolver::resolver::get_dependencies_forking package=root, version=0a0.dev0
uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
0.013687s 0ms DEBUG uv_resolver::resolver Adding direct dependency: cryptography*
uv_resolver::resolver::process_request request=Versions cryptography
uv_resolver::resolver::choose_version package=cryptography
uv_client::registry_client::simple_api package=cryptography
uv_resolver::resolver::process_request request=Prefetch cryptography *
error: failed to read from file C:\temp\simple\cryptography\index.html
Caused by: The system cannot find the path specified. (os error 3)

A minimal setup can be found here, github doesnt allow .7z files (maturin init compiled as 0.1.0 and 0.2.0):
https://we.tl/t-WOJyEdOD1L

@charliermarsh
Copy link
Member

Yeah we should treat this as a 404 effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants