Releasing#
For maintainers who cut a release. MUST, SHOULD and MAY are used as defined in RFC 2119.
Contributors add changelog fragments as they work, as described in Changelog. The release adds up those fragments. The result is published on the Changelog page.
When releases happen#
Releases happen when ready, with no fixed schedule. Any maintainer MAY propose one by opening an issue titled “Release X.Y.Z”.
Release steps#
Create a release branch.
git switch -c release/X.Y.ZSet the new version in
setup.py.Build the changelog section. This writes
CHANGELOG.mdand deletes the fragments. Preview it first with--draft.towncrier build --draft --version X.Y.Z towncrier build --version X.Y.Z --yes
Add the Highlights to the new section, and the Contributors list. Get the contributors from the commits since the previous tag.
git shortlog -sn vPREV..HEADCheck the deprecations, as described in the next section.
Open the release pull request. It needs one maintainer approval. The reviewer checks that every
breaking,resultsanddeprecatedentry says what to do, and that items deprecated in the previous release are removed or have a recorded extension.gh pr create --title "Release X.Y.Z"After the merge, tag the merge result on
masterand push the tag.git switch master git pull git tag -a vX.Y.Z -m "ROTIFER X.Y.Z" git push origin vX.Y.Z
Create the GitHub release, using the new section of
CHANGELOG.mdas the notes.gh release create vX.Y.Z --title "ROTIFER X.Y.Z" --notes-file <section>
Removing deprecations due in this release#
A deprecated item spends exactly one release deprecated and is removed in the next one. Before the release, find what is due:
grep -rn "DeprecationWarning" lib bin
Compare the result with the Deprecated section of the previous release in CHANGELOG.md. Every item listed there MUST be removed in this release, and each removal gets a removed fragment.
Only in extraordinary circumstances MAY maintainers keep an item longer. The reason MUST be recorded in the Deprecated section of the release that keeps it.
Yanking a release#
A bad release is never re-tagged or deleted. Publish a PATCH release that fixes it, and mark the bad release in its CHANGELOG.md heading, with the reason below it:
## [X.Y.Z] - YYYY-MM-DD [YANKED]
See PEP 592 for the same idea in Python package indexes.