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

uv pip-compile upgrade dependencies from tool.uv.sources even without the --upgrade flag #10383

Open
Corentin-Bravo opened this issue Jan 8, 2025 · 0 comments

Comments

@Corentin-Bravo
Copy link

  • Version of uv : 0.5.15
  • OS: Ubuntu 22.04.4 LTS
  • Command ran: uv pip compile pyproject.toml --no-emit-index-url --python-platform=linux --output-file=requirements.txt
  • (reduced and curated) Content of my pyproject.toml:
dependencies = [
  "myPrivateLibrary_1~=84.0,>=84.0.1",
  "myPrivateLibrary_2~=6.3,>=6.3.3",
]
[[tool.uv.index]]
name = "myIndex"
url = "myIndexUrl"

[tool.uv.sources]
myPrivateLibrary_1 = {index = "myIndex"}
myPrivateLibrary_2 = {index = "myIndex"}
  • Original content of my requirements.txt:
myPrivateLibrary_2==6.4.1
    # via myProject (pyproject.toml)
myPrivateLibrary_1==84.0.0
    # via myProject (pyproject.toml)
  • Expected content of my requirements.txt after running the command:
myPrivateLibrary_2==6.4.1
    # via myProject (pyproject.toml)
myPrivateLibrary_1==84.0.1
    # via myProject (pyproject.toml)
  • Actual content of my requirements.txt after running the command:
myPrivateLibrary_2==6.5.0
    # via myProject (pyproject.toml)
myPrivateLibrary_1==84.0.1
    # via myProject (pyproject.toml)

Note that removing the tool.uv.sources part of the pyproject.toml and running the same command produce the expected behaviour.

It seems as though I ran with the --upgrade-package flag on all packages in tool.uv.sources, which does not seem to be documented, intended or logical from an end user point of view.

If the observed behaviour is intended for your side, is there a way to circumvent it (other than removing the tool.uv.sources block, as I want to make use of the "explicit" index feature) ? Could you document this behaviour, or point me towards the relevant documentation if it exists ?

Thank you in advance

@Corentin-Bravo Corentin-Bravo changed the title uv pip-compile upgrade dependencies from extra-index even without the --upgrade flag uv pip-compile upgrade dependencies from tool.uv.sources even without the --upgrade flag Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant