Closed yannsartori closed 1 month ago
Yeah, I think you're looking for uv lock --upgrade-package <project>
.
I think @charliermarsh recently fielded a similar question to this.
We can probably add some docs for this.
Awesome, thanks for the quick reply @zanieb! I'll pursue that solution then. I'll leave this open if you guys want to create the documentation PR off this issue, but my question was answered.
👍 Thanks for following up. I'll improve the docs a bit and will use this issue to track that work.
Hello,
I currently use bumpver to automatically version bump my project in CI (realistically, all this tool does from a "versioning" perspective is search and replacing). In particular, it updates the
version
key in mypyproject.toml
file.The flow is thus merge new feature into main as its own commit -> automatically change these files with version specifiers (just
pyproject.toml
) -> commit the changes as a version bump change.However, I noticed by manually inspecting my
uv.lock
that it also maintains aversion
key for my project. I try to run all my commands with--frozen
to keep myuv.lock
file as unchanged as possible, so thisversion
key can be quite out of date from the one present inpyproject.toml
after a series of version bumps.My question for you all is how to best manage this? A couple of solutions I have thought of:
uv.lock
be out of date. I'm guessing this can lead to complications down the roadbumpver
update theuv.lock
file manually. Since there is a big disclaimer about not editing the lock file manually, I am hesitant to do thisuv lock --upgrade-package NAME_OF_PROJECT
. My hope is it would just update the package information in the lock file, and NOT its dependencies, but I couldn't find any exact information on its behavior.I know there is an issue to add capabilities for uv to manage versions for you automatically (https://github.com/astral-sh/uv/issues/6298) but my question is how to manage updating versions in general without this.