Skip to content

fix: remove pluggy dependency from hatchling#2217

Closed
LalatenduMohanty wants to merge 1 commit intopypa:masterfrom
LalatenduMohanty:fix/remove-hatchling-pluggy-dependency
Closed

fix: remove pluggy dependency from hatchling#2217
LalatenduMohanty wants to merge 1 commit intopypa:masterfrom
LalatenduMohanty:fix/remove-hatchling-pluggy-dependency

Conversation

@LalatenduMohanty
Copy link
Copy Markdown

The dependency chain setuptools-scm → vcs-versioning → hatchling → pluggy → setuptools-scm creates a cycle that blocks source-only builds.

Replace pluggy with a minimal stdlib-only HookRegistry using importlib.metadata for entry point discovery.

Fixes #752

@LalatenduMohanty LalatenduMohanty force-pushed the fix/remove-hatchling-pluggy-dependency branch 2 times, most recently from 2ae4f00 to 5c0b3d7 Compare March 26, 2026 04:20
@cjames23
Copy link
Copy Markdown
Member

All the doc references need to be updated including spec docs so that plugin authors know the correct way to implement plugins if this change is merged.

@LalatenduMohanty
Copy link
Copy Markdown
Author

Thanks for the review! Could you clarify which specific docs you mean by "spec docs"? Are you referring to:

  1. The hook specifications in backend/src/hatchling/plugin/specs.py (already updated in this PR)
  2. The reference docs under docs/plugins/*/reference.md
  3. Something else entirely?

Want to make sure we update the right places.

@LalatenduMohanty LalatenduMohanty force-pushed the fix/remove-hatchling-pluggy-dependency branch 2 times, most recently from 57cab0b to c3b8870 Compare March 27, 2026 02:57
@cjames23
Copy link
Copy Markdown
Member

Specifically if we are changing the mechanism the plugins about.md needs to be updated to provide information about plugin development with the new mechanism

…pendency

The dependency chain setuptools-scm → vcs-versioning → hatchling → pluggy
→ setuptools-scm creates a cycle that blocks source-only builds.

Replace pluggy with a minimal stdlib-only HookRegistry using importlib.metadata
for entry point discovery.

Fixes pypa#752

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
@LalatenduMohanty LalatenduMohanty force-pushed the fix/remove-hatchling-pluggy-dependency branch from c3b8870 to 800b0d5 Compare March 27, 2026 13:26
@LalatenduMohanty
Copy link
Copy Markdown
Author

@cjames23 I have updated the docs/plugins/about.md as per your suggestion, PTAL.

@LalatenduMohanty
Copy link
Copy Markdown
Author

Closing this in favor of #2076

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.

prepare a migration from pluggy hooks to entrypoints

2 participants