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

tool.uv.pip.index-url not working #6800

Closed
sunfkny opened this issue Aug 29, 2024 · 3 comments · Fixed by #6814
Closed

tool.uv.pip.index-url not working #6800

sunfkny opened this issue Aug 29, 2024 · 3 comments · Fixed by #6814
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@sunfkny
Copy link

sunfkny commented Aug 29, 2024

Steps to Reproduce:

  1. Create a pyproject.toml file with the following content:

    [project]
    name = "app"
    version = "0.1.0"
    dependencies = [
        "urllib3",
    ]
    
    [tool.uv]
    package = false
    
    [tool.uv.pip]
    index-url = "https://test.pypi.org/simple"
  2. Run the following command:

    ~/app# uv sync --no-cache --upgrade --verbose 2>&1 | grep simple
  3. Observe the output.

Expected Behavior:

The output should indicate that uv is using the specified index-url (https://test.pypi.org/simple) to fetch packages.

Actual Behavior:

The output shows that uv is still attempting to access the default PyPI repository:

DEBUG No cache entry for: https://pypi.org/simple/urllib3/

Environment:

uv Platform: Ubuntu 24.04 LTS on WSL2
uv Version: uv 0.4.0

@oriori1703
Copy link

If I understand correctly, [tool.uv.pip] only applies to the uv pip subcommand.
For uv sync, you should use [tool.uv]

@sunfkny
Copy link
Author

sunfkny commented Aug 29, 2024

If I understand correctly, [tool.uv.pip] only applies to the uv pip subcommand. For uv sync, you should use [tool.uv]

Thanks for pointing this out! It works for me.

However, it seems the current documentation on configuration files (Configuration Files) might be a bit misleading. The documentation starts by showing how to configure [tool.uv.pip], while the difference between [tool.uv] and [tool.uv.pip] is only mentioned at the very bottom of the page

@charliermarsh
Copy link
Member

@sunfkny -- That's a good call, we should change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants