Skip to content

Cap pluggy below 1.7.0 #5363 - #5364

Merged
AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
syahra712:fix/pin-pluggy-below-1.7
Oct 16, 2026
Merged

AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
syahra712:fix/pin-pluggy-below-1.7

Conversation

@syahra712

@syahra712 syahra712 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Reference:

pluggy 1.7.0 stopped accepting the class-based hookspecs that plugincode registers (PreScanPlugin, ScanPlugin, etc.), so scancode now fails on import with:

ValueError: did not find any 'pre_scan' hooks in <module 'plugincode.pre_scan' ...>

requirements.txt already pins pluggy==1.6.0, but the published wheels only declare pluggy >= 1.0.0, which means a fresh pip install scancode-toolkit picks up 1.7.0 and breaks. This PR caps it at < 1.7.0 in pyproject.toml, pyproject-scancode-toolkit.toml and pyproject-scancode-toolkit-mini.toml, and adds a CHANGELOG entry.

On the pluggy side (pytest-dev/pluggy#794), the maintainers said class hookspecs were never meant to be supported, so a longer-term fix probably has to happen in plugincode. This just gets installs working again in the meantime.

Checked in a clean venv:

  • pluggy==1.7.0 + plugincode: import plugincode.pre_scan raises the error above
  • pluggy>=1.0.0,<1.7.0 (resolves to 1.6.0): all five plugincode stage modules import fine

pluggy 1.7.0 rejects the class-based hookspecs that plugincode registers,
so importing scancode.cli fails with "did not find any 'pre_scan' hooks".
Keep pluggy below 1.7.0 until plugincode is updated.

Signed-off-by: 72004 <syahra2014@gmail.com>

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is okay as a temporary fix to our tests, but pip install scancode-toolkit will continue to be broken (and we might need to modify some code to support newer version of pluggy potentially too), and so I'm not closing the issue.

@AyanSinhaMahapatra
AyanSinhaMahapatra merged commit dccaa76 into aboutcode-org:develop Oct 16, 2026
35 of 37 checks passed
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.

2 participants