You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 my pyproject.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 a version key for my project. I try to run all my commands with --frozen to keep my uv.lock file as unchanged as possible, so this version key can be quite out of date from the one present in pyproject.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:
Just ignore this problem out right, and let the version in the uv.lock be out of date. I'm guessing this can lead to complications down the road
Also make bumpver update the uv.lock file manually. Since there is a big disclaimer about not editing the lock file manually, I am hesitant to do this
Regenerate the lock file after I bump the version. This seems to defeat the purpose of using a lock file at all, if I am updating it in CI.
I looked into uv 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 (#6298) but my question is how to manage updating versions in general without this.
The text was updated successfully, but these errors were encountered:
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.
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 (#6298) but my question is how to manage updating versions in general without this.
The text was updated successfully, but these errors were encountered: