Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#5,367 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

  • #5373 của @knowprasad — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
2.7k
Fork
831
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aboutcode-org/scancode-toolkit

Tất cả issue của aboutcode-org/scancode-toolkit

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.