Repository navigation
Python(chore): automate the changelog and release version bump - #825
Merged
Merged
Conversation
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-825/ Deployed from |
alexluck-sift
marked this pull request as ready for review
October 12, 2026 21:29
The Python version now comes from `python/v*` tags through setuptools-scm, so nothing is bumped in `pyproject.toml` or `uv.lock`. Changelog entries are per-PR fragments in `python/changelog.d`, rendered into `CHANGELOG.md` at release time. A release prep workflow opens the changelog PR, and merging it creates the tag and starts the PyPI publish workflow. The changelog also appears on the docs site and in the GitHub Release notes.
Bump mkdocstrings to 1.0.7, which works with pymdown-extensions 12.2, and raise the docs extras to Python 3.11. Keep tests out of the wheel, drop the unreachable 0.0.0 guard, and document merging the release PR first.
Drop setuptools-scm and keep the version in pyproject.toml. Release Prep sets it with uv version alongside the rendered changelog, and Release Tag tags the version in pyproject.toml once it merges.
Fail a release PR whose merge result still has fragments, and fail a tag build with leftover fragments before it reaches PyPI.
release_version.py now reads the version and fragment rules from pyproject.toml and adds --current and --leftover. Release Tag refuses to tag with leftover fragments, PyPI Publish checks stable tags before CI, and python_build.yaml matches main again. The changelog check fetches two commits and runs towncrier through uvx.
alexluck-sift
force-pushed
the
al/Changelog-improvements
branch
from
October 12, 2026 21:35
a927475 to
b3018fa
Compare
Docs CI now installs from uv.lock, so mkdocstrings 1.0.3 and the Python 3.10 floor for the docs extras stay as they are on main.
wei-sift
requested changes
Oct 13, 2026
alexluck-sift
force-pushed
the
al/Changelog-improvements
branch
from
October 13, 2026 22:53
62a0482 to
a53d407
Compare
wei-sift
reviewed
Oct 13, 2026
wei-sift
self-requested a review
October 13, 2026 23:01
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.
Summary
Changelog entries are now written as per-PR fragments, and a workflow opens the release PR that sets the version and renders the changelog. A release no longer needs a hand-edited version, lockfile or changelog.
Changelog
python/adds a fragment inpython/changelog.d/, and CI enforces it. An empty<PR>.chore.mdmeans no user-visible change. Seepython/changelog.d/README.md.CHANGELOG.mdis added to the docs site, and each GitHub Release includes its version's section.Release flow
pyproject.tomlanduv.lockwithuv version, renders the changelog and opens a PR for review.pyproject.tomlversion aspython/vX.Y.Zand starts PyPI Publish. If anotherpython/change merges while the release PR is open, the changelog check warns on the release PR and Release Tag refuses to tag until the leftover fragments are in the changelog. PyPI Publish also checks that a stable tag matchespyproject.tomlbefore CI runs.Verification
uv version --no-synclocally. It changes only the version line inpyproject.tomlanduv.lock.