astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
27.56k stars 793 forks source link

Remove `--upgrade`, `--no-upgrade`, and `--upgrade-package` from `uv tool upgrade` #9318

Closed charliermarsh closed 4 days ago

charliermarsh commented 4 days ago

Summary

--upgrade isn't useful, since it's the default. So it's now hidden, but continues to warn if you enable it.

--no-upgrade isn't useful, since it panics. So it's now removed entirely. This isn't breaking, since it already didn't work.

--upgrade-package actually is useful, because it turns out it allows things like: uv tool upgrade babel --upgrade-package "babel<0.2.14" to constrain the upgrade.

I left this in place but hid it... I think we should provide a better workflow for this, like uv tool upgrade "babel<0.2.14"? It's strange to specify the package twice, and that uv tool upgrade has an --upgrade-package flag.

Closes https://github.com/astral-sh/uv/issues/9317.

charliermarsh commented 4 days ago

Do you think the changes themselves make sense? It's tricky, I wasn't sure.