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
{{ message }}
Repository navigation
Commit b8bead8
Browse filesBrowse the repository at this point in the historyBrowse files
README.md is the long description PyPI shows, so its pre-commit `rev:`
is fixed when the wheel is built. Until now that depended on a hand bump
merging to main after the version was known and before the release was
published; 11 of the 24 releases since #546 missed that window.
The publish job now writes the release's tag into every `rev:` in the
README before it builds, and gives setuptools-scm the tag's version so
the edited tree does not build as X.Y.Z.post1.dev0. The step fails if
the README has no pin to update. The workflow_dispatch dry run has no
tag and skips it.
AGENTS.md drops the exception for pinning ahead of the tag and the
check after publishing: the README on main is bumped once the release
exists, so it never names a tag pre-commit cannot resolve.
Closes#722
Copy file name to clipboardExpand all lines: AGENTS.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,14 @@ and a stale pin is invisible: the snippet keeps working, it just installs an old
34
34
35
35
3.**Say so in the pull request description** when you moved them, so the bump is not a silent diff in an unrelated change.
36
36
37
-
The one exception is a pull request that prepares an unpublished release: there the pins are written **ahead** of the tag, on purpose,
38
-
and the pull request merges **before** the release is published. `pyproject.toml` sets `readme = "README.md"`, so this file is the long description PyPI shows,
39
-
and the publish workflow builds from whatever `main` holds at that moment. A README bumped after the release ships the old pin to PyPI, where it cannot be corrected
40
-
without another release. Check it afterwards: `rev:` on the release's PyPI page must name that release.
37
+
Do not pin **ahead** of a release. Until the tag exists, pre-commit cannot resolve the pin, so a README that names an unpublished version
38
+
gives anyone who copies the snippet an error. Bump it once the release is published.
41
39
42
-
`.pre-commit-config.yaml` is a different case and is **not** covered by this rule. That pin is this repository running its own hooks,
40
+
What PyPI shows does not depend on that bump. `pyproject.toml` sets `readme = "README.md"`, so this file is the long description on PyPI,
41
+
and the publish workflow (`.github/workflows/publish.yml`) writes the release's tag into every `rev:` before it builds. A late bump only leaves
42
+
the README on GitHub one release behind until it lands.
43
+
44
+
`.pre-commit-config.yaml` is **not** covered by this rule. That pin is this repository running its own hooks,
43
45
and pre-commit resolves it against real tags when CI runs — so pointing it at a version that is not published yet breaks the build. Bump it only after the release exists.
0 commit comments