fix: derive the version from src/__about__.py - #74
Merged
Conversation
uv records a version for the root package in uv.lock only when pyproject.toml states one statically. release-please bumped pyproject.toml and left the lock behind, so `uv sync --locked` failed on every release PR -- and would have kept failing on every PR afterwards, since the stale lock lands on main at merge. Making the version dynamic removes the field from uv.lock entirely, so a release bump can no longer desynchronise it and --locked stays strict for dependabot. The uv.lock entry in release-please-config.json is dropped: the TOML updater evaluates its jsonpath with jsonpath-plus, which does not apply the [?(@.name=='labops')] filter, so it silently matched nothing and only ever logged "No entries modified".
Closed
FreezeManny
added a commit
that referenced
this pull request
Aug 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.10.0](labops-v0.9.1...labops-v0.10.0) (2026-08-19) ### Features * short web service ([#69](#69)) ([a526369](a526369)) ### Bug Fixes * build pipeline ([#72](#72)) ([c8b9de6](c8b9de6)) * derive the version from src/__about__.py ([#74](#74)) ([d5b8511](d5b8511)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #73.
Problem
uv sync --lockedfails on every release PR (e.g. #70):uv records a
versionfor the root package inuv.lockonly whenpyproject.tomlstates one statically. release-please bumpspyproject.tomland leaves the lock behind, so the two disagree.The blast radius is wider than the release PR:
Testruns onpull_request, so once a release PR merges, the stale lock lands on main and every subsequent PR fails the same way.Docs(uv sync --locked --group docs, onrelease: published) would fail on the release itself.Publishis unaffected — it only runsuv build.Fix
Make the version dynamic. With
dynamic = ["version"], uv omits the field from the lock entirely, so a release bump cannot desynchronise it and--lockedstays strict for the dependabot PRs it was added for.uv lock --checkrelease-please now updates
src/__about__.pythrough its generic (comment-annotation) updater instead.Also dropped
The
uv.lockentry added torelease-please-config.jsonin #72 was a silent no-op. Its jsonpath is evaluated byjsonpath-plus, which does not apply the[?(@.name=='labops')]filter, so it matched nothing and only logged a warning — visible in the Release Please run for #70:Non-matching paths only warn, never fail, which is why #72 looked like it worked.
Verification
uv lock→Updated labops v0.9.1 -> (dynamic); theversionfield is gone from the lockuv sync --lockedpasses from a clean environment and installslabops==0.9.1__about__.pyto0.10.0leavesuv lock --checkpassing, anduv buildproduceslabops-0.10.0artifactsruff checkcleanNot verifiable locally: that release-please actually rewrites the annotated line — that only proves out on the next Release Please run. It uses the annotation-based generic updater rather than the jsonpath path that failed before.
After merge
release-please regenerates #70 against the new config, bumping
src/__about__.pyinstead ofpyproject.toml, and its stale-lock diff disappears.