Skip to content

fix(build): relax the hatchling pin and unbreak the Arch recipe - #103

Merged
gianlucamazza merged 2 commits into
mainfrom
fix/hatchling-pin-arch-build
Sep 13, 2026
Merged

gianlucamazza merged 2 commits into
mainfrom
fix/hatchling-pin-arch-build

Conversation

@gianlucamazza

@gianlucamazza gianlucamazza commented Sep 13, 2026

Copy link
Copy Markdown
Owner

requires = ["hatchling>=1.27,<1.28"] broke every --no-isolation build against a newer backend (distro packaging: found: 1.30.1). Relaxed to <2.

The Arch recipe pointed source/sha256sums at the 1.3.3 sdist while pkgver was 1.3.5; both now reference the published 1.3.5 sdist, and prepare() drops the old upper bound from already-published sdists (removable once a release ships the relaxed pin).

  • makepkg -f builds 1.3.5-1 with python-hatchling 1.30.1, check() passes
  • main merged in: the earlier CI failure was pip-audit on httpx2/httpcore2 2.9.1, fixed on main by chore: bump httpx2 from 2.9.1 to 2.12.0 #101
  • tests/repo/test_brand_assets.py::test_tokens_match_platform fails on main too — pre-existing, untouched

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved package build compatibility with newer Hatchling 1.x releases.
    • Updated Arch Linux packaging to build version 1.3.5 successfully with distribution-provided tooling.
    • Added packaging preparation steps to handle older source archives during Arch builds.
  • Documentation

    • Documented the Arch packaging workaround, build limitations, release checklist updates, and when the workaround can be removed.

gianlucamazza and others added 2 commits September 11, 2026 18:53
`requires = ["hatchling>=1.27,<1.28"]` made every `--no-isolation` build fail
against a newer backend, which is exactly what distro packaging does:

    ERROR Unmet dependencies (checked against /usr/sbin/python):
    	hatchling<1.28,>=1.27
    		wanted: <1.28,>=1.27
    		found: 1.30.1

The upper bound entered in fadcb87 ("release: prepare 1.3.1") with no stated
rationale — it was a bare `hatchling` before — and nothing depends on it.
Relaxed to `<2`, so only the next major is guarded.

The Arch recipe was independently broken: `pkgver` had moved to 1.3.5 while
`source`/`sha256sums` still pointed at the 1.3.3 sdist, so it could not pass
its own integrity check. Both now reference the published 1.3.5 sdist
(verified against pypi.org/pypi/mklang/json).

Released sdists up to 1.3.5 still carry the tight pin, so `prepare()` drops
the upper bound in the extracted tree; it is documented as removable once a
release ships the relaxed pin.

Verified end to end on Arch with python-hatchling 1.30.1: `makepkg -f` builds
mklang 1.3.5-1 and `check()` passes (654 passed, 7 skipped).

`tests/repo/test_brand_assets.py::test_tokens_match_platform` fails on this
branch and on main alike — pre-existing, untouched here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 202c0a7e-3777-41e6-ab4e-0154a28e7973

📥 Commits

Reviewing files that changed from the base of the PR and between ea60c15 and 8eb66e4.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • packaging/arch/PKGBUILD
  • packaging/arch/README.md
  • pyproject.toml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The project now permits Hatchling versions from 1.27 through below 2. The Arch recipe uses the 1.3.5 source and checksum and patches extracted source distributions during preparation. Documentation and the changelog describe the packaging updates.

Changes

Packaging compatibility

Layer / File(s) Summary
Build requirement and Arch prepare step
pyproject.toml, packaging/arch/PKGBUILD, packaging/arch/README.md
The Hatchling upper bound changes from <1.28 to <2. Arch prepare() applies the same change to extracted source distributions, and the README documents the patch and its removal condition.
Release source synchronization
packaging/arch/PKGBUILD, packaging/arch/README.md, CHANGELOG.md
The Arch recipe points to the 1.3.5 source archive and checksum. Release instructions and the unreleased changelog entry describe the synchronization and packaging fixes.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to 8eb66

The Arch package can apply the Hatchling compatibility workaround to the matching 1.3.5 source, with no unresolved merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: relaxing the Hatchling pin and fixing the Arch packaging recipe.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hatchling-pin-arch-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gianlucamazza
gianlucamazza merged commit a6447cb into main Sep 13, 2026
15 checks passed
@gianlucamazza
gianlucamazza deleted the fix/hatchling-pin-arch-build branch September 13, 2026 13:17
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.

1 participant