Skip to content

Fix build hook compatibility with Hatchling 1.32.1 - #62

Merged
timkpaine merged 2 commits into
mainfrom
fix-hatchling-build-hook-interface
Sep 16, 2026
Merged

timkpaine merged 2 commits into
mainfrom
fix-hatchling-build-hook-interface

Conversation

@timkpaine

@timkpaine timkpaine commented Sep 16, 2026

Copy link
Copy Markdown
Member

Description

Hatchling 1.32.1 breaks plugin imports by adding a second generic parameter to BuildHookInterface. Correct the build hook example to use the unsubscripted interface. This preserves hook compatibility with older Hatchling versions.

The same upstream release also imports hatch.plugin.manager without declaring Hatch, breaking CLI builds with ModuleNotFoundError. Exclude exactly 1.32.1 in build-system, runtime, and development requirements so installations select a working backend without requiring Hatch. Future releases remain allowed within existing version bounds.

Verified without Hatch installed: all 9 CLI tests pass with resolved Hatchling 1.32.0, and isolated wheel/sdist builds pass. Versions remain unchanged.

Type of Change

  • Bug fix

Checklist

  • Relevant local tests pass
  • Isolated wheel and source distribution builds pass
  • Full CI suite passes

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

9 tests  ±0   9 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 8c4f55b. ± Comparison against base commit aa6be5f.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.47%. Comparing base (aa6be5f) to head (8c4f55b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   96.47%   96.47%           
=======================================
  Files           5        5           
  Lines         227      227           
  Branches        7        7           
=======================================
  Hits          219      219           
  Misses          7        7           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine
timkpaine merged commit a25dd47 into main Sep 16, 2026
4 checks passed
@timkpaine
timkpaine deleted the fix-hatchling-build-hook-interface branch September 16, 2026 18:03
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