Skip to content

fix: bump the version of prereleases in src/copick_shared_ui/__init__.py - #75

Merged
uermel merged 1 commit into
v2.0from
uermel/release-please-prerelease-version
Oct 6, 2026
Merged

uermel merged 1 commit into
v2.0from
uermel/release-please-prerelease-version

Conversation

@uermel

@uermel uermel commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

The same release-please fix as copick/copick#500 (and copick-mcp#64), for this repo's v2.0 prerelease line.

Cause: release-please's Python updater (17.6.0) matches __version__ with [0-9]+\.[0-9]+\.[0-9]+(?:-\w+)?. A dotted prerelease suffix (-alpha.1) does not fit -\w+, so from the first alpha on, every prerelease bump silently leaves the version file alone, and so would the final 2.0.0. The release then builds the previous version, which PyPI refuses as a duplicate. That is what happened to copick 2.0.0-alpha.2 and copick-mcp 2.0.0-alpha.2. main is unaffected (plain versions).

Fix:

  • Both release-please configs list src/copick_shared_ui/__init__.py as a generic extra file, and its version line carries # x-release-please-version. The generic updater handles dotted prereleases.
  • The version stays 2.0.0-alpha.1, what v2.0 is; the next alpha would otherwise have built alpha.1 again.
  • The publish job compares the built wheel's version with the release's and fails, naming the file, instead of on PyPI's duplicate check.

Checked

  • uv build --wheel builds the version in the manifest; the configs and the workflow parse.
  • release-please's generic pattern, applied to the marked line, gives the next alpha and the final 2.0.0.

🤖 Generated with Claude Code

release-please's Python updater matches the version with
[0-9]+\.[0-9]+\.[0-9]+(?:-\w+)?, which a dotted prerelease suffix does
not fit: from "2.0.0-alpha.1" on it silently leaves the version alone,
so a release builds the previous version again (copick 2.0.0-alpha.2
and copick-mcp 2.0.0-alpha.2 were refused by PyPI as duplicates).

- Both release-please configs list src/copick_shared_ui/__init__.py as a
  generic extra file, and its version line carries an x-release-please-
  version marker; the generic updater handles dotted prereleases and the
  final 2.0.0.
- The version stays 2.0.0-alpha.1, what v2.0 is; the next alpha would
  otherwise have built alpha.1 again.
- The publish job compares the built wheel's version with the release's
  and fails, naming the file, instead of on PyPI's duplicate check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uermel
uermel merged commit 7130602 into v2.0 Oct 6, 2026
3 of 6 checks passed
uermel pushed a commit that referenced this pull request Oct 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-alpha.2](copick-shared-ui-v2.0.0-alpha.1...copick-shared-ui-v2.0.0-alpha.2)
(2026-10-06)


### 🐞 Bug Fixes

* bump the version of prereleases in src/copick_shared_ui/__init__.py
([#75](#75))
([7130602](7130602))

---
Merging this PR will publish a copick-shared-ui alpha prerelease to
PyPI.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant