Skip to content

Use collective LICENSE attribution and PEP 639 license metadata - #809

Merged
laughingman7743 merged 2 commits into
masterfrom
feat/807-license-metadata
Sep 25, 2026
Merged

laughingman7743 merged 2 commits into
masterfrom
feat/807-license-metadata

Conversation

@laughingman7743

@laughingman7743 laughingman7743 commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

WHAT

PyAthena remains MIT-licensed. This PR changes how the license is attributed and declared.

  • LICENSE: the copyright line changes from Copyright 2017 laughingman7743 to Copyright 2017 The PyAthena authors, matching the file headers. The MIT license text is unchanged.
  • pyproject.toml (PEP 639):
    • license = "MIT" and license-files = ["LICENSE", "NOTICE"] replace license = {file = "LICENSE"}.
    • The License :: OSI Approved :: MIT License classifier is removed, because PEP 639 deprecates license classifiers in favor of the license expression.
    • The build backend requirement becomes hatchling>=1.27. Hatchling 1.26.0 introduced the array form of license-files, and 1.27.0 made core metadata 2.4 (which writes License-Expression and License-File) the default.
    • authors becomes The PyAthena authors (no email), and the maintainer's name and email move to maintainers. METADATA then has Author: The PyAthena authors and Maintainer-email: laughingman7743 <…>, so copyright attribution and the contact person are separate.
  • docs/conf.py: the Sphinx copyright becomes 2017-<current year>, The PyAthena authors, and author becomes The PyAthena authors.
  • docs/contributing.md: the sentence saying the policy doesn't change the root LICENSE is reworded, since this PR changes it.

Wheel METADATA, before and after:

Field Before After
License: full LICENSE text (absent)
License-Expression: (absent) MIT
License-File: LICENSE, NOTICE LICENSE, NOTICE (now declared explicitly)
Classifier: License :: OSI Approved :: MIT License present (absent)
Author-email: laughingman7743 <…> (absent)
Author: (absent) The PyAthena authors
Maintainer-email: (absent) laughingman7743 <…>

Consumer impact:

  • Tools that read only the License: field or license classifiers need License-Expression support to show MIT. PyPI and the README's shields.io badge already read license_expression; I checked the badge with hatchling and uv, which publish only license_expression.
  • Building from source now needs hatchling 1.27 or later. Isolated builds, the default for pip and uv, install a matching version automatically.

WHY

Closes #807.

The wheel METADATA already listed both LICENSE and NOTICE as license files (#807 mentioned only NOTICE). The license text came from license = {file = "LICENSE"}.

The maintainer holds the LICENSE notice and chose the collective attribution The PyAthena authors, which new files have used since #788 and existing maintainer-only files since #805.

TEST

Tested at the head commit of this PR, rebased onto master after #811 and #813:

  • uv build:
    • Wheel METADATA is Metadata-Version: 2.5 with License-Expression: MIT, License-File: LICENSE, and License-File: NOTICE, with no License: field and no license classifier.
    • Author: The PyAthena authors and Maintainer-email: laughingman7743 <…>.
    • The sdist PKG-INFO has the same fields.
    • The wheel contains dist-info/licenses/LICENSE and NOTICE. The sdist contains LICENSE and NOTICE.
  • uvx twine check on the sdist and wheel: both PASSED. This is the check gh-action-pypi-publish runs.
  • uv lock --check: passes, with no lock change.
  • just lint: passes.
  • just benchmark test: 80 passed, 1 skipped. This includes benchmarks/tests/test_packaging.py, which the benchmark workflow runs only on benchmarks/ changes.
  • uv run sphinx-build docs: the footer renders Copyright © 2017-2026, The PyAthena authors. The build's warnings are pre-existing and unrelated.
  • markdownlint-cli2 docs/contributing.md: 0 errors.

Maintainer release task: after the next release, confirm the license shown on PyPI.

No AWS resources are needed.

🤖 Generated with Claude Code

Comment thread pyproject.toml
requires-python = ">=3.10"
readme = "README.md"
license = {file = "LICENSE"}
license = "MIT"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review round one (implementation behavior): CLEAN

Base 82e88f4ebbd89a4dad8b3b57ac412012601f0c45, head 0fac3b9d6115df96608e5dafda11614883094eea.

Covered:

  • uv build output: wheel and sdist METADATA (License-Expression: MIT, License-File LICENSE/NOTICE, no License: field or classifier);
  • NOTICE still ships in the sdist despite only-include;
  • twine check on both artifacts;
  • uv lock --check;
  • benchmarks/tests/test_packaging.py via just benchmark test;
  • the docs/conf.py copyright/author usage (defined only there) and the rendered footer;
  • the README license badge: shields.io pypi/l renders license_expression, checked against hatchling and uv, which publish only an expression.

Comment thread pyproject.toml

[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = ["hatchling>=1.27", "hatch-vcs"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review round two (claims and operational behavior): FINDINGS, repaired in the PR description

Claims checked:

  • hatchling>=1.27: the hatchling changelog shows 1.26.0 adopted the array form of license-files, and 1.27.0 made core metadata 2.4 the default.
  • The twine check claim matches what gh-action-pypi-publish runs.
  • The Sphinx footer text matches the rendered HTML.

Findings and repairs:

  1. The PR body's before/after table (following Revisit LICENSE attribution and package license metadata #807's premise) said the old wheel had only License-File: NOTICE. The prior METADATA (built at the Add MIT headers to existing files written solely by the maintainer #805 head) already had License-File: LICENSE and NOTICE. The table and WHY are corrected.
  2. "PEP 639 replaces license classifiers" is reworded to "deprecates".
  3. A consumer-impact section was added for license scanners that read only License: or classifiers, and for the build-time hatchling lower bound.

No code change; the head remains 0fac3b9.

Comment thread LICENSE
@@ -1,4 +1,4 @@
Copyright 2017 laughingman7743
Copyright 2017 The PyAthena authors

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (relayed): CLEAN

  • Reviewer: OpenAI Codex CLI 0.156.0 (codex exec --sandbox read-only, reasoning effort high), session 01a0d0de-9089-78c3-84e0-dc64e3d93f51.
  • Scope: static review of 82e88f4ebbd89a4dad8b3b57ac412012601f0c45..0fac3b9d6115df96608e5dafda11614883094eea, run in a detached snapshot at the head. The prompt excluded the PR number, description, and prior findings. The reviewer made no edits, builds, or test runs.

Reviewer result, summarized:

  • Hatchling 1.27.0 produces core metadata 2.4 with License-Expression: MIT and both license files.
  • LICENSE and NOTICE are included in the sdist despite only-include, and in the wheel's license directory, including when the wheel is rebuilt from the sdist.
  • Attribution and documentation text are consistent.

Non-blocking suggestion: benchmarks/tests/test_packaging.py:25 allows LICENSE/NOTICE but doesn't assert their presence or the metadata fields. Deferred: that test guards the exclusion of benchmark packaging from the main sdist. This PR's metadata was verified by building (see the round one record).

@laughingman7743
laughingman7743 marked this pull request as ready for review September 24, 2026 02:31
@laughingman7743
laughingman7743 marked this pull request as draft September 24, 2026 15:58
laughingman7743 and others added 2 commits September 25, 2026 01:04
Change the root LICENSE copyright line to "The PyAthena authors", matching
the file headers, and the Sphinx copyright and author values with it.
Package author and contact metadata still names the maintainer.

Declare the license as the SPDX expression "MIT" with LICENSE and NOTICE as
license files, remove the MIT license classifier that PEP 639 replaces,
and require hatchling 1.27 or later, whose default core metadata 2.4 writes
License-Expression and License-File.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set the package authors to "The PyAthena authors", matching LICENSE, and
move the maintainer's name and email to maintainers, so that the metadata
separates copyright attribution from the contact person.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@laughingman7743
laughingman7743 force-pushed the feat/807-license-metadata branch from 0fac3b9 to 10bb29e Compare September 24, 2026 16:06
Comment thread pyproject.toml
authors = [
{name = "The PyAthena authors"},
]
maintainers = [

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer-requested change: authors / maintainers, with independent follow-up (relayed)

At the maintainer's request, 10bb29e6e3d25c8c22038ba9b534da2277c05d99 sets authors to The PyAthena authors (no email) and moves the maintainer's name and email to maintainers. The branch was rebased onto master (#811, #813) first; git range-diff shows the earlier commit is patch-identical to 0fac3b9.

Self-review of the change:

  • uv build: METADATA and PKG-INFO have Author: The PyAthena authors and Maintainer-email: laughingman7743 <…>, with no Author-email.
  • twine check passed for both artifacts.
  • uv lock --check, just lint, and just benchmark test (80 passed, 1 skipped) pass.
  • Consumer effect: tools that read the author email now find it in Maintainer-email. The PR body's metadata table records this.

Independent follow-up — Codex CLI 0.156.0, read-only, effort high, session 01a0d42b-1907-7361-b4a9-97c0bf0669ca. Static review of HEAD~1..HEAD at 10bb29e. Result: CLEAN.

  • These are valid PEP 621 fields, and they map to the intended core metadata.
  • The benchmarks workspace member doesn't override the root metadata.
  • No repository statement contradicts the attribution.
  • The rebased earlier commit is patch-equivalent to 0fac3b9.

Non-blocking suggestion, deferred as before: assert the metadata fields in benchmarks/tests/test_packaging.py. That test guards benchmark packaging, and this PR's metadata was verified by building.

@laughingman7743
laughingman7743 marked this pull request as ready for review September 24, 2026 16:52
@laughingman7743
laughingman7743 merged commit c7ca9a1 into master Sep 25, 2026
19 checks passed
@laughingman7743
laughingman7743 deleted the feat/807-license-metadata branch September 25, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit LICENSE attribution and package license metadata

1 participant