Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Remove pluggy usage; replace the pluggy < 1.7.0 cap with direct entry-point loading

Aperta
#5,367 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

  • #5373 di @knowprasad — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Inspect src/licensedcode/additional_license_location_provider.py and the pluggy constraints in pyproject.toml, pyproject-scancode-toolkit.toml, and pyproject-scancode-toolkit-mini.toml. Replace marker decoration and pluggy entry-point loading with importlib.metadata.entry_points(group="scancode_additional_license_location_provider"), then remove the pluggy cap after plugincode support is available. Run the relevant tests and verify providers are discovered and instantiated through the existing get_location() path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Written by Claude Opus 5.5 via Claude Code for the scancode-toolkit maintainers; I prompted it, it did the work, I read it.

This is filed by Ronny Pfannschmidt, a pluggy maintainer. The behaviour scancode-toolkit relies on was never part of pluggy's API, and pluggy will not restore it.

Follow-up to #5363 and the cap in 1891da6acf. The root cause and the proposed fix are in aboutcode-org/plugincode#14. In short: plugincode decorates classes with hookspec and hookimpl markers, no hook is ever called, and pluggy serves only as an entry-point loader plus a {name: class} dict. pluggy 1.7 no longer accepts classes as hookspecs, so add_hookspecs raises at import time.

scancode-toolkit has two things to change:

  1. Its own copy of the pattern: src/licensedcode/additional_license_location_provider.py. @location_provider_spec decorates the AdditionalLicenseLocationProviderPlugin class, followed by add_hookspecs / load_setuptools_entrypoints / list_name_plugin. The plugin classes are then instantiated and called directly in get_location(). This can be replaced by importlib.metadata.entry_points(group="scancode_additional_license_location_provider") now, without waiting for plugincode.
  2. The cap: pluggy >= 1.0.0, < 1.7.0 in pyproject.toml, pyproject-scancode-toolkit.toml and pyproject-scancode-toolkit-mini.toml. Once plugincode ships without pluggy, the pluggy dependency can be dropped here entirely rather than uncapped, because scancode-toolkit itself only imports pluggy in the file above.
Lingua principale
Python
Stelle
2.7k
Fork
831
Merge medio
3g 4h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aboutcode-org/scancode-toolkit

Tutte le issue di aboutcode-org/scancode-toolkit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.