From 00a46372225bb81b8c854066021e1312b87bd6ec Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Fri, 7 Aug 2026 12:48:47 -0400 Subject: [PATCH] docs: move three fixes out of the published 0.2.0 section into 0.3.0 v0.2.0 WAS ALREADY CUT. It was tagged and pushed on 2026-08-03 at 3dfc5dc, and proxy.golang.org has served it since: {"Version":"v0.2.0","Time":"2026-08-03T16:19:37Z", "Origin":{"Hash":"3dfc5dc4447367996e677fbf7f7008fa307624d1",...}} Four commits landed after that tag -- #19, #20, #21, #22 -- and three of them wrote their entries into the dated `## [0.2.0]` section rather than `[Unreleased]`, on the stated reasoning that the tag had not been cut yet. So the changelog claimed for v0.2.0 three changes that v0.2.0 does not contain: the required comma between specifiers, the empty-specifier-set inversion, and all-digit local segment normalization. `[Unreleased]` was empty. A GO MODULE TAG IS IMMUTABLE once the proxy has seen it, so there is no version of this that ends with v0.2.0 being correct. The entries move forward instead. Two of the three narrow what parses and one changes rendered output, so per this module's own stated policy -- breaking changes take a minor bump while major is 0 -- the next tag is 0.3.0, not 0.2.1. VERIFIED that the 0.2.0 section is now byte-identical to what the tag shipped: `git diff 3dfc5dc -- CHANGELOG.md` removes exactly one line, the [Unreleased] compare link, which is replaced. Everything else is additive. Also documents #19 under 0.3.0's Notes. It was NOTICE-only so it had no entry, but it is the release's most consequential change for a redistributor: it credits pkginfo and twine, whose material distribution/ ports uncredited through v0.2.0, corrects pypa/packaging's license to the Apache-2.0-OR-BSD-2-Clause dual offer, and deletes a claim that no source from the cited projects was incorporated -- false since tags/ landed on 2026-07-08, and therefore false in v0.1.0, v0.1.1, v0.1.2 and v0.2.0 alike. And adds the guardrail to CLAUDE.md, since the existing rule said entries go under [Unreleased] without saying to verify the assumption that a dated section is unreleased. CI does not validate the changelog. Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 63 ++++++++++++++++++++++++++++++++++++++-------------- CLAUDE.md | 7 ++++++ 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a270142..a7a24e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,15 +9,19 @@ mistaken for a safe patch upgrade. ## [Unreleased] -## [0.2.0] - 2026-08-03 +## [0.3.0] - 2026-08-07 -A conformance release. `requirement/`, `version/`, and the PEP 508 grammar are now -tested against tables ported from `pypa/packaging`'s `tests/test_requirements.py` -(upstream SHA `4eb0753`), and the divergences those tables revealed are fixed. +Finishes the conformance work `0.2.0` began, and corrects the module's attribution. -Several of those fixes **narrow what parses**, and one **changes rendered output**. -Read the Breaking section before upgrading — this is why the release is `0.2.0` -rather than `0.1.3`. +The three behavior changes below were originally written into `0.2.0`'s section on the +belief that its tag had not yet been cut. It had: `v0.2.0` was published on 2026-08-03 +at `3dfc5dc` and a Go module tag cannot be moved once the module proxy has seen it. So +they ship here instead, and `0.2.0`'s section no longer lists them. **If you read that +section before 2026-08-07, it claimed these three for `v0.2.0` and `v0.2.0` does not +contain them.** + +Two of the three **narrow what parses** and one **changes rendered output**, which is why +this is `0.3.0` rather than `0.2.1`. ### Breaking @@ -38,6 +42,39 @@ rather than `0.1.3`. gate moves from rejecting everything to admitting everything. Note that no input string can produce such a value — every degenerate input errors — so only a deliberately constructed or zero-valued `Specifiers` is affected. +- A local version segment consisting entirely of ASCII digits normalizes as an integer, + so `1.0+007` renders as `1.0+7` and `1.0+ubuntu-007` as `1.0+ubuntu.7`. PEP 440 says + such a segment "should be considered an integer", and scopes its + no-normalization carve-out to integers inside an *alphanumeric* segment — so + `1.0+foo0100` is still left exactly as it is. **Ordering is unaffected**: those + segments were already compared numerically, so `1.0+007` and `1.0+7` compared equal + before and after. What changes is the rendered string, and therefore arbitrary + equality: `===1.0+7` now matches `1.0+007`, as upstream does, where it previously + did not. + +### Notes + +- `NOTICE` now credits the Python `pkginfo` package (MIT, Copyright (c) 2009 Agendaless + Consulting, Inc. and Contributors) and `pypa/twine` (Apache-2.0), whose material + `distribution/` ports. Neither was credited through `v0.2.0`. It also records that + `pypa/packaging` is dual-licensed Apache-2.0 **or** two-clause BSD rather than + Apache-2.0 only, and deletes a stale claim that no source from the cited projects was + incorporated — false since `tags/` landed on 2026-07-08, and so false in every released + version to date. **Redistributors of `v0.2.0` or earlier should take the `NOTICE` from + this release.** No code changed. + +## [0.2.0] - 2026-08-03 + +A conformance release. `requirement/`, `version/`, and the PEP 508 grammar are now +tested against tables ported from `pypa/packaging`'s `tests/test_requirements.py` +(upstream SHA `4eb0753`), and the divergences those tables revealed are fixed. + +Several of those fixes **narrow what parses**, and one **changes rendered output**. +Read the Breaking section before upgrading — this is why the release is `0.2.0` +rather than `0.1.3`. + +### Breaking + - `Requirement.String()` renders the marker separator as `"; "` when the requirement has no URL. It previously always rendered `" ; "`. The `" ; "` form is kept when a URL *is* present, because a bare `;` immediately after a URL is ambiguous — a URL @@ -61,15 +98,6 @@ rather than `0.1.3`. *above* `1.0+ubuntu-10`. It now sorts below, matching upstream. Consumers that persist or compare rendered versions, or that rely on the previous sort order of dash- or underscore-separated local labels, will see a difference. -- A local version segment consisting entirely of ASCII digits normalizes as an integer, - so `1.0+007` renders as `1.0+7` and `1.0+ubuntu-007` as `1.0+ubuntu.7`. PEP 440 says - such a segment "should be considered an integer", and scopes its - no-normalization carve-out to integers inside an *alphanumeric* segment — so - `1.0+foo0100` is still left exactly as it is. **Ordering is unaffected**: those - segments were already compared numerically, so `1.0+007` and `1.0+7` compared equal - before and after. What changes is the rendered string, and therefore arbitrary - equality: `===1.0+7` now matches `1.0+007`, as upstream does, where it previously - did not. ### Added @@ -145,7 +173,8 @@ Initial release. One module, one package per PEP concern: - `license/` — PyPI classifier standardization, SPDX expression parsing, and top-level license derivation. -[Unreleased]: https://github.com/posit-dev/go-python-packaging/compare/v0.2.0...HEAD +[Unreleased]: https://github.com/posit-dev/go-python-packaging/compare/v0.3.0...HEAD +[0.3.0]: https://github.com/posit-dev/go-python-packaging/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/posit-dev/go-python-packaging/compare/v0.1.2...v0.2.0 [0.1.2]: https://github.com/posit-dev/go-python-packaging/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/posit-dev/go-python-packaging/compare/v0.1.0...v0.1.1 diff --git a/CLAUDE.md b/CLAUDE.md index ef9081e..4861501 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -118,6 +118,13 @@ narrowing especially, because a consumer's previously-valid input starts errorin - Sections: `Breaking`, `Added`, `Fixed`, `Notes`. Put narrowing changes under `Breaking`, not `Fixed`, even when the old behavior was a bug. +- ⚠️ **Never add an entry to a dated section, only to `[Unreleased]`** — not even when the + release looks unreleased. Check `git ls-remote --tags origin` before you assume: three + fixes were filed under `## [0.2.0] - 2026-08-03` on the belief its tag was uncut, when + the tag had been pushed and the module proxy had already served it. **A Go module tag is + immutable once the proxy sees it**, so the changelog was claiming fixes the published + version did not contain, and the only remedy was a new release. If a dated section is + wrong, correct it in a follow-up release; do not backdate into it. - While the major version is `0`, breaking changes ship in a **minor** bump (`0.1.x` → `0.2.0`), never a patch. A consumer pinning `^0.1` would otherwise pick up a narrowing change silently.