fix(license): start the copyright term at 2017, and drop the end year - #630
Conversation
6336b1e to
672c04c
Compare
Requested by the owner; no issue is open for it. * `LICENSE:3` began the term at 2018, a year after the work it covers. The repository's first commit is `c57f7d0b7` "Initial commit", dated 2017-11-07, so the notice understated the term and disagreed with `docs/source/conf.py`, which already computes its Sphinx footer from 2017. * That start year was wrong from the moment it was first written. `bc836cfa2` (2020-05-31) introduced `2018-2020` when the BSD-3-Clause text replaced MPL 2.0 -- the file until then was stock MPL carrying no author notice at all -- and the range was then bumped by hand three times, to `2018-2022`, `2018-2023` and `2018-2026` (#615), each bump correcting the end year and copying `2018` forward untouched. * The end year is dropped rather than automated. The notice ships inside the sdist and the wheel, so it cannot be computed at read time the way the docs footer is; copyright subsists from creation regardless of the notice; and BSD-3-Clause's canonical form carries a single year. No workflow, hook or script is added in its place -- that was considered and rejected. * `docs/source/conf.py` is untouched: already self-maintaining, already starting at 2017, and a docs footer showing a range is conventional. * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. The licence body is unaltered -- the whole-file diff is one hunk at line 3, and the remaining 28 lines carry the canonical BSD-3-Clause wording verbatim. Three things distinguish the file from SPDX's bare `licenseText`, all of them pre-existing: the `BSD 3-Clause License` title line, the `*` bullets in place of `1.`/`2.`/`3.`, and the extra `All rights reserved.` line. No tests were run: one line of legal prose, nothing under `pcapkit/`.
672c04c to
7bd5d9f
Compare
Requested by the owner; no issue is open for it. * `MANIFEST.in` had `include` lines for `README.md`, `LICENSE` and `CHANGELOG.md` but none for `CITATION.cff`, and its two `global-include` patterns are `*.rst` and `*.py`, neither of which matches a `.cff`. The file was therefore in the repository and in no source distribution. * Nor was there a default to fall back on. Removing all three `include` lines and rebuilding shows `README.md` and `LICENSE` shipping regardless -- setuptools adds the latter from `license_files`, logging `adding license file 'LICENSE'` and recording `License-File: LICENSE` in `PKG-INFO` -- while `CHANGELOG.md` disappears. Of the three only `CHANGELOG.md` is load-bearing, and a citation file, which no packaging default covers at all, is in the same position. * The gap is invisible from the web UI, since GitHub renders the "Cite this repository" button from the repository. Citation managers, Zenodo and dependency inventories read the published artifact, which is the surface that was missing it. * It matters now because #625 has just taught `util/bump_version.py` to keep that file's `version` and `date-released` in step with the bump, so a release exercising that path would publish an sdist omitting the artefact under test. #615 flagged the omission when it added the file; #619 did not address it. * It also lets `RepositoryCitationTests` in `tests/project/test_bump_version.py` -- the gate #625 added for the hand-authored bumps that never run the script -- execute against an unpacked sdist, where today it skips itself with "CITATION.cff is not shipped in the source distribution". * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. Rebased onto `cfb81d3f6` after #630 merged; the changelog conflict was resolved keeping both bullets and regenerating `CHANGELOG.md` rather than merging it. Measured both ways with `python -m build --sdist` against that base: `tar tzf | grep -i citation` found nothing before and `pypcapkit-1.5.0b4/CITATION.cff` after; the listings differ by that one entry and nothing else, 860 against 861; the shipped copy is byte-identical to the repository's; and `twine check --strict` reports PASSED on both. No tests were run -- one line of packaging configuration, nothing under `pcapkit/`.
#630 merged with two inaccurate claims in its changelog entry, both about the history of `LICENSE` rather than about the change itself. `LICENSE` is untouched here -- 2017 was and remains the right answer, so this is prose only. * The entry claimed the file "until then was stock MPL text carrying no author notice at all, so 2018 is the first start year the project ever asserted and it was already a year late when it was written". Every clause is wrong. Reading all 14 commits that touched `LICENSE`: it was MIT (`c57f7d0b7`, 2017-11-07), then GPL v3, then Apache 2.0, then MPL 2.0 -- five licences, not two. MIT carried `Copyright (c) 2017 Jarry Shaw` on line 3 and the GPL appendix carried `Copyright (C) 2017 Jarry Shaw`, so the project asserted 2017 from its first commit. `2018` first appeared in the Apache notice of 2018-12-08 as a single year, current for that year; it only became a wrong start year in 2020 when `bc836cfa2` carried it into BSD as a range start. * The passage also contradicted the entry's own opening sentence, which dates the first commit to 2017-11-07. * Corrected rather than deleted, because the real history is the stronger argument: #630 restores the year the project originally asserted. * The `BSD 3-Clause License` title line is reattributed from the opensource.org template, whose licence text begins at the copyright line, to choosealicense.com's, whose body opens with that exact line and also carries the `Copyright (c) [year], [fullname]` comma this file uses. * A new bullet records that the #630 entry carried these claims, rather than rewriting them away silently. The error came from generalising the pre-BSD era from `bc836cfa2^:LICENSE` and `1c69341dc:LICENSE`, which are the same blob -- one data point covering only the last 18 months of a 2.5-year period. Caught by cross-review after #630 merged. `CHANGELOG.md` regenerated with `util/changelog_md.py`; `--check` exits 0. No tests were run: changelog prose only, nothing under `pcapkit/`.
#630 merged with two inaccurate claims in its changelog entry, both about the history of `LICENSE` rather than about the change itself. `LICENSE` is untouched here -- 2017 was and remains the right answer, so this is prose only. * The entry claimed the file "until then was stock MPL text carrying no author notice at all, so 2018 is the first start year the project ever asserted and it was already a year late when it was written". Every clause is wrong as a description of the era, though each was true of the single blob `bc836cfa2` replaced. Reading all 14 commits that touched `LICENSE`: it was MIT (`c57f7d0b7`, 2017-11-07), then GPL v3, then Apache 2.0, then MPL 2.0 -- four licences before BSD, not the one implied. MIT carried `Copyright (c) 2017 Jarry Shaw` on line 3 and the GPL appendix carried `Copyright (C) 2017 Jarry Shaw`, so the project asserted 2017 from its first commit. `2018` first appeared in the Apache notice of 2018-12-08 as a single year, current for that year; it only became a wrong start year in 2020 when `bc836cfa2` carried it into BSD as a range start. * The passage also contradicted the entry's own opening sentence, which dates the first commit to 2017-11-07. * Corrected rather than deleted, because the real history is the stronger argument: #630 restores the year the project originally asserted. * The `BSD 3-Clause License` title line is reattributed from the opensource.org template, whose licence text begins at the copyright line, to choosealicense.com's, whose body opens with that exact line and also carries the `Copyright (c) [year], [fullname]` comma this file uses. * A new bullet records that the #630 entry carried these claims, rather than rewriting them away silently. The error came from generalising the pre-BSD era from `bc836cfa2^:LICENSE` and `1c69341dc:LICENSE`, which are the same blob -- one data point covering only the last 18 months of a 2.5-year period. Caught by cross-review after #630 merged. `CHANGELOG.md` regenerated with `util/changelog_md.py`; `--check` exits 0. No tests were run: changelog prose only, nothing under `pcapkit/`.
Cross-review: NEEDS CHANGES — arrived after merge, and the fix is #638Independent cross-review by a subagent on a different model (Claude Haiku), run read-only on its own clones in This PR merged before the review completed. Posting the verdict anyway, because it found a real defect in what landed. The code change in this PR is correct — The change itself: confirmed correct
The defect: two false claims in the changelog entry1. The pre-BSD history. The entry asserts the file "until then was stock MPL text carrying no author notice at all, so 2018 is the first start year the project ever asserted and it was already a year late when it was written". Every clause of that is wrong as a description of the era. Enumerating all 14 commits that ever touched The true history is a better argument than the one written: this change restores the year the project originally asserted rather than asserting it anew. 2. The title-line attribution. The entry credits the How it got past meI checked Also confirmed by the review, for the recordThe Corrected in #638. No tests were run for either PR, deliberately — a |
#630 merged with two inaccurate claims in its changelog entry, both about the history of `LICENSE` rather than about the change itself. `LICENSE` is untouched here -- 2017 was and remains the right answer, so this is prose only. * The entry claimed the file "until then was stock MPL text carrying no author notice at all, so 2018 is the first start year the project ever asserted and it was already a year late when it was written". Every clause is wrong as a description of the era, though each was true of the single blob `bc836cfa2` replaced. Reading all 14 commits that touched `LICENSE`: it was MIT (`c57f7d0b7`, 2017-11-07), then GPL v3, then Apache 2.0, then MPL 2.0 -- four licences before BSD, not the one implied. MIT carried `Copyright (c) 2017 Jarry Shaw` on line 3 and the GPL appendix carried `Copyright (C) 2017 Jarry Shaw`, so the project asserted 2017 from its first commit. `2018` first appeared in the Apache notice of 2018-12-08 as a single year, current for that year; it only became a wrong start year in 2020 when `bc836cfa2` carried it into BSD as a range start. * The passage also contradicted the entry's own opening sentence, which dates the first commit to 2017-11-07. * Corrected rather than deleted, because the real history is the stronger argument: #630 restores the year the project originally asserted. * The `BSD 3-Clause License` title line is reattributed from the opensource.org template, whose licence text begins at the copyright line, to choosealicense.com's, whose body opens with that exact line and also carries the `Copyright (c) [year], [fullname]` comma this file uses. * A new bullet records that the #630 entry carried these claims, rather than rewriting them away silently. The error came from generalising the pre-BSD era from `bc836cfa2^:LICENSE` and `1c69341dc:LICENSE`, which are the same blob -- one data point covering only the last 18 months of a 2.5-year period. Caught by cross-review after #630 merged. `CHANGELOG.md` regenerated with `util/changelog_md.py`; `--check` exits 0. No tests were run: changelog prose only, nothing under `pcapkit/`.
`util/changelog_md.py --check` has failed on `main` since #638 (375e9d4), which inserted three lines into the generated `CHANGELOG.md` directly instead of running the generator. That left the #630 bullet duplicated -- the stale pre-correction text alongside the corrected one -- and the #631 bullet in the wrong position relative to its source entry. Regenerated from `docs/source/changelog/1.5.0.rst`, which was always correct: the phrase appeared once there and twice in the generated file. `Changelog drift` had failed on four consecutive commits (375e9d4, a62aed1, a05f461, da381f2), and because `tests/project/test_changelog_md.py::RepositoryStateTests` asserts the same consistency, all twelve matrix jobs failed with it -- 13 of 14 on run 35748204467. Every open pull request inherited the failure. --check now exits 0.
LICENSE:3readCopyright (c) 2018-2026, Jarry Shaw. It now readsCopyright (c) 2017, Jarry Shaw. That is two changes in one line, and both were asked for by the repository owner — there is no open issue for this, so there is noFixesline to give.The start year is 2017, not 2018
Established from the repository's own history rather than from memory:
c57f7d0b7is genuinely the only root ofmain(git rev-list --max-parents=0 origin/mainreturns it alone), so the work the notice covers began on 2017-11-07 and2018understated the term by a year.That start year has been wrong since the moment it was first written. The file's history:
bc836cfa2Copyright (c) 2018-20204f07f4ee42018-2022f1950035a2018-202315189abff(#615)2018-2026So
2018is the first start year the project ever asserted, and it was already a year late on the day it was written. The three hand bumps that followed each corrected the end year and copied2018forward untouched — #615, the most recent, edited this very line, got the end right, and left the start wrong.It also disagreed with the only other copyright site in the tree.
docs/source/conf.py:51readsso the rendered docs footer has been saying 2017 for as long as it has existed while
LICENSEsaid 2018. After this change the two agree on where the term starts, which resolves the discrepancy.The end year is dropped rather than automated
A range in this file is maintenance that buys nothing, for three reasons that all point the same way:
LICENSEis included in the sdist and the wheel, so its text is fixed at build time in every copy anyone has already downloaded. It cannot be computed the waydocs/source/conf.py:51computes its own footer, because there is nothing evaluating it at read time.Copyright (c) <year> <owner>, singular.Against that, the cost is real and measured: six years of hand maintenance on one line, three separate edits, every one of them late, and every one of them a chance to get the start year wrong — which is exactly what happened, three times running.
So no workflow, no script hook, and no other automation is added for this. That option was considered explicitly and rejected: automating a value that does not need to be current is strictly worse than not having the value.
docs/source/conf.py:51is deliberately not touched. It is already self-maintaining and already starts at 2017, and a docs footer showing a range is conventional and correct. Only the static legal text loses its range.Nothing else in the tree needed changing
git grep -nEi "copyright.*20[0-9]{2}"over the tree, excludingCHANGELOG.mdanddocs/source/changelog/(historical prose, which should keep saying what it said at the time), returns exactly two hits:LICENSE:3anddocs/source/conf.py:51. Two broader sweeps — every case-insensitivecopyrightmention, and every20xx-20xxrange anywhere — turn up no third site, and sweep two confirms no year range now remains outside changelog prose.CITATION.cffhas nocopyrightfield and no year field. Its only date-shaped value isdate-released: '2026-09-20', which the file's own header describes as the newest published release rather than anything to do with the copyright term. Unaffected.The licence body is untouched
Checked in both directions, because a licence file is the wrong place to be casual:
1 insertion(+), 1 deletion(-)in a single hunk at line 3. No other line differs.licenseText, and all three predate this change: theBSD 3-Clause Licensetitle line, which the opensource.org/choosealicense template carries and SPDX omits; the three conditions being*bullets rather than1./2./3.; and the extraAll rights reserved.line. Each is present unchanged atead73b204.LICENSE:29still ends... POSSIBILITY OF SUCH DAMAGE.— the strayDAMAGE.sthat docs: add CITATION.cff and bring the copyright notice up to date #615 removed has not come back.100755, pre-existing).Changelog
A
**Fixed**bullet indocs/source/changelog/1.5.0.rst, withCHANGELOG.mdregenerated byutil/changelog_md.pyand--checkconfirmed to exit 0.CHANGELOG.mdwas not hand-edited.No tests were run: this changes one line of legal prose and one changelog entry, and touches nothing under
pcapkit/.Note for whoever merges
This PR and #631 both insert a bullet at the same point in
docs/source/changelog/1.5.0.rst, so they conflict with each other (and with the other changelog-touching PRs in flight). Whichever lands second needs a rebase that keeps every bullet, then autil/changelog_md.pyregeneration rather than a hand merge ofCHANGELOG.md.