Skip to content

fix(license): start the copyright term at 2017, and drop the end year - #630

Merged
JarryShaw merged 1 commit into
mainfrom
fix/license-copyright-start-year
Sep 22, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/license-copyright-start-year

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Sep 22, 2026

Copy link
Copy Markdown
Owner

LICENSE:3 read Copyright (c) 2018-2026, Jarry Shaw. It now reads Copyright (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 no Fixes line to give.

The start year is 2017, not 2018

Established from the repository's own history rather than from memory:

$ git log --reverse --format='%ad %h %s' --date=format:'%Y-%m-%d' origin/main | head -1
2017-11-07 c57f7d0b7 Initial commit

c57f7d0b7 is genuinely the only root of main (git rev-list --max-parents=0 origin/main returns it alone), so the work the notice covers began on 2017-11-07 and 2018 understated the term by a year.

That start year has been wrong since the moment it was first written. The file's history:

commit date line 3
2017-11 → 2018 stock GPL text, no author notice
2018 → 2020 stock MPL 2.0 text, no author notice
bc836cfa2 2020-05-31 BSD-3-Clause text arrives: Copyright (c) 2018-2020
4f07f4ee4 2022-05-31 2018-2022
f1950035a 2023-05-08 2018-2023
15189abff (#615) 2026-09-21 2018-2026

So 2018 is 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 copied 2018 forward 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:51 reads

copyright = f'2017-{datetime.date.today().year}, Jarry Shaw'  # pylint: disable=redefined-builtin

so the rendered docs footer has been saying 2017 for as long as it has existed while LICENSE said 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:

  • It ships inside a published artifact. LICENSE is 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 way docs/source/conf.py:51 computes its own footer, because there is nothing evaluating it at read time.
  • Copyright subsists from creation regardless of the notice. Under Berne, protection does not depend on a notice at all, let alone on the notice naming the current year. A stale end year costs nothing legally; maintaining it buys nothing legally.
  • BSD-3-Clause's canonical form carries a single year. The upstream template is 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:51 is 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, excluding CHANGELOG.md and docs/source/changelog/ (historical prose, which should keep saying what it said at the time), returns exactly two hits: LICENSE:3 and docs/source/conf.py:51. Two broader sweeps — every case-insensitive copyright mention, and every 20xx-20xx range anywhere — turn up no third site, and sweep two confirms no year range now remains outside changelog prose.
  • CITATION.cff has no copyright field and no year field. Its only date-shaped value is date-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:

  • The whole-file diff is 1 insertion(+), 1 deletion(-) in a single hunk at line 3. No other line differs.
  • The remaining 28 lines were compared word-for-word against the canonical BSD-3-Clause text and are identical.
  • Three things distinguish this file from SPDX's bare licenseText, and all three predate this change: the BSD 3-Clause License title line, which the opensource.org/choosealicense template carries and SPDX omits; the three conditions being * bullets rather than 1./2./3.; and the extra All rights reserved. line. Each is present unchanged at ead73b204.
  • LICENSE:29 still ends ... POSSIBILITY OF SUCH DAMAGE. — the stray DAMAGE.s that docs: add CITATION.cff and bring the copyright notice up to date #615 removed has not come back.
  • No CRLF, no non-ASCII, trailing newline intact, file mode unchanged (100755, pre-existing).

Changelog

A **Fixed** bullet in docs/source/changelog/1.5.0.rst, with CHANGELOG.md regenerated by util/changelog_md.py and --check confirmed to exit 0. CHANGELOG.md was 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 a util/changelog_md.py regeneration rather than a hand merge of CHANGELOG.md.

@JarryShaw
JarryShaw force-pushed the fix/license-copyright-start-year branch from 6336b1e to 672c04c Compare September 22, 2026 04:54
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/`.
@JarryShaw
JarryShaw force-pushed the fix/license-copyright-start-year branch from 672c04c to 7bd5d9f Compare September 22, 2026 05:13
@JarryShaw
JarryShaw merged commit cfb81d3 into main Sep 22, 2026
24 checks passed
@JarryShaw
JarryShaw deleted the fix/license-copyright-start-year branch September 22, 2026 05:15
JarryShaw added a commit that referenced this pull request Sep 22, 2026
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/`.
JarryShaw added a commit that referenced this pull request Sep 22, 2026
#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/`.
JarryShaw added a commit that referenced this pull request Sep 22, 2026
#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/`.
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review: NEEDS CHANGES — arrived after merge, and the fix is #638

Independent cross-review by a subagent on a different model (Claude Haiku), run read-only on its own clones in /tmp, briefed to falsify rather than to bless.

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 correctLICENSE:3 reading Copyright (c) 2017, Jarry Shaw is right, and the licence body is intact. The defect is in the changelog prose, and it is corrected by #638.

The change itself: confirmed correct

  • Licence body byte-identical apart from line 3. Whole-file diff is one hunk, one line: LICENSE | 2 +-. The remaining 28 lines were normalised and compared token-by-token against the SPDX licenseText fetched from spdx.org/licenses/BSD-3-Clause.json — 213 tokens each side, diff exit 0 for this-PR-vs-SPDX, base-vs-SPDX and this-PR-vs-base. Nothing altered, dropped or reordered.
  • LICENSE:29 clean. cat -A gives OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.$ — no trailing s; grep -n 'DAMAGE\.s' exit 1. No CRLF, no non-ASCII, trailing newline intact. 29 lines / 1510 bytes, against the base's 1515, the 5-byte delta being -2026 dropped.
  • First-commit date confirmed, including a check for hidden roots. git rev-list --max-parents=0 origin/main returns exactly one root, c57f7d0b7, authored 2017-11-07 13:39:45 +0800. --all does reveal a second root, 7392a4b71, but it is Initial gh-pages commit dated 2021-01-10, on origin/gh-pages only and not an ancestor of main. No earlier commit exists.
  • No third copyright-year site. Re-derived independently with a plain recursive grep over the whole worktree (reaching .github/, conda/, .idea/, .vscode/, docs templates, setup.py, pyproject.toml) plus a second sweep for any 20(1[7-9]|2[0-9]) across *.cfg *.toml *.yml *.yaml *.in *.cff setup.py *.json: exactly LICENSE:3 and docs/source/conf.py:51, nothing else copyright-related.
  • docs/source/conf.py genuinely untouchedcmp against the base reports IDENTICAL, and line 51 still reads copyright = f'2017-{datetime.date.today().year}, Jarry Shaw'.
  • CITATION.cff has no copyright or copyright-year fieldgrep -niE 'copyright' exit 1; the only date-shaped value in the file is date-released: '2026-09-20'.
  • One commit on ead73b204, no merges, author and committer Jarry Shaw <jarryshaw@icloud.com>, and only LICENSE plus the two changelog files touched.

The defect: two false claims in the changelog entry

1. 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 LICENSE: it was MIT (c57f7d0b7, 2017-11-07), then GPL v3, then Apache 2.0, then MPL 2.0 — four licences before BSD. c57f7d0b7:LICENSE:3 is Copyright (c) 2017 Jarry Shaw, so the project asserted 2017 in its very first commit and kept doing so for seven months; 2018 first appeared in the Apache notice of 2018-12-08 as a single year, current for the year it was written. The passage also contradicted its own opening sentence, which dates the first commit to 2017-11-07.

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 BSD 3-Clause License title line to "the opensource.org template". That template's licence text begins at the copyright line; the one whose body opens with that exact title is GitHub's choosealicense.com, which also carries the Copyright (c) [year], [fullname] comma this file uses.

How it got past me

I checked bc836cfa2^:LICENSE and 1c69341dc:LICENSE, found no author notice in either, and generalised. But git rev-parse bc836cfa2^ is 8f937d7af, whose tree holds 1c69341dc's blob — the two things I checked were the same file, so it was one data point covering only the last 18 months of a 2.5-year period. Enumerating every commit that touched LICENSE, rather than sampling the one before the relicence, is what found it.

Also confirmed by the review, for the record

The 2017 start year was right, and the reasoning behind dropping the end year holds: LICENSE ships inside the sdist and the wheel so it cannot be computed at read time, copyright subsists from creation regardless of the notice, and BSD-3-Clause's canonical form carries a single year. No workflow or hook was added, deliberately.

Corrected in #638. No tests were run for either PR, deliberately — a coverage run -m pytest in this repo reached 41.4 GB RSS today and had to be killed, and neither change needs the suite.

JarryShaw added a commit that referenced this pull request Sep 22, 2026
#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/`.
@JarryShaw JarryShaw added the fix Pull requests that fix a defect (fix: subject prefix) label Sep 22, 2026
JarryShaw added a commit that referenced this pull request Sep 22, 2026
`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests that fix a defect (fix: subject prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant