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

Pluggy 1.7.0 breaks scancode

Aperta
#5,363 2 commenti 3 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

The traceback points to plugincode/__init__.py line 182, where add_hookspecs is called on the plugincode.pre_scan module, and then into pluggy's _manager.py add_hookspecs, which raises when it finds no hook markers. Start by reproducing with pluggy 1.7.0 and comparing how plugincode/pre_scan.py marks its hookspecs against the 1.6.0 behaviour. Done means the scancode CLI runs on pluggy 1.7.0 and its plugin tests pass.

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

Descrizione

bug
Description

The update to pluggy 1.7.0 from a few hours ago results in the following error when trying to run scancode (in version scancode_toolkit-32.5.0-cp313):

Traceback (most recent call last):
  File "/usr/local/bin/scancode", line 5, in <module>
    from scancode.cli import scancode
  File "/usr/local/lib/python3.13/dist-packages/scancode/cli.py", line 57, in <module>
    from plugincode import pre_scan
  File "/usr/local/lib/python3.13/dist-packages/plugincode/pre_scan.py", line 30, in <module>
    pre_scan_plugins = PluginManager(
        stage=stage, module_qname=__name__, entrypoint=entrypoint, plugin_base_class=PreScanPlugin
    )
  File "/usr/local/lib/python3.13/dist-packages/plugincode/__init__.py", line 182, in __init__
    self.manager.add_hookspecs(sys.modules[module_qname])
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/pluggy/_manager.py", line 366, in add_hookspecs
    raise ValueError(
        f"did not find any {self.project_name!r} hooks in {module_or_class!r}"
    )
ValueError: did not find any 'pre_scan' hooks in <module 'plugincode.pre_scan' from '/usr/local/lib/python3.13/dist-packages/plugincode/pre_scan.py'>
How To Reproduce

Install the latest pluggy and scancode versions:

pip3 install pyyaml pluggy==1.7.0 scancode-toolkit

and try to run scancode.

Fixing pluggy to the previous version fixes the issue:

pip3 install pyyaml pluggy==1.6.0 scancode-toolkit
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.