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

Confused about updating packages #11973

Open
lucharo opened this issue Mar 5, 2025 · 3 comments
Open

Confused about updating packages #11973

lucharo opened this issue Mar 5, 2025 · 3 comments
Labels
question Asking for clarification or support

Comments

@lucharo
Copy link

lucharo commented Mar 5, 2025

Question

Hi, the other day I was working on my project, managed by uv. I wanted to upgrade my polars version to the latest version. I ran uv add -U polars from a folder not in the root of my project (so pyproject.toml) wasn't in that folder, the environment updated succesfully but the changes weren't reflected in my pyproject.toml). I then navigated to the root of the project and ran the same command again, still nothing happened. Then I ran uv add "polars==1.24.0" and finally the pyproject.toml, is this expected?

I would have assumed that uv add -U polars would have updated my environment and my pyproject.toml from wherever it had been executed.

Platform

Darwin 24.3.0 arm64

Version

uv 0.5.4 (c62c83c 2024-11-20)

@lucharo lucharo added the question Asking for clarification or support label Mar 5, 2025
@zanieb
Copy link
Member

zanieb commented Mar 5, 2025

Sounds like you're looking for #6794

It does sound reasonable to bump the lower bound in uv add -U polars though 🤔

cc @konstin

@sglbl
Copy link

sglbl commented Mar 10, 2025

Related 11509 . I agree and I thought the same thing that this already existed.

@konstin
Copy link
Member

konstin commented Mar 10, 2025

Agreed that this is unintuitive.

For context, this is currently happening because we treat --upgrade as a (basically global) lockfile-only option, so uv add --upgrade foo says "add foo to pyproject.toml (if it doesn't exist) and update the versions in the lockfile" instead of the expected "add the latest lower bound of foo to pyproject.toml and update the versions in the lockfile".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

4 participants