Skip to content

Stop author detections at Python Project-URL fields - #5323

Open
Shubham-Padkonde wants to merge 1 commit into
aboutcode-org:developfrom
Shubham-Padkonde:fix/pkg-info-author-boundary
Open

Shubham-Padkonde wants to merge 1 commit into
aboutcode-org:developfrom
Shubham-Padkonde:fix/pkg-info-author-boundary

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Fixes #5303.

When an Author: field is followed by Project-URL: fields in Python package metadata, copyright scanning includes those URLs in the author name. Treat the metadata field label as a boundary in the existing lexer, alongside the other metadata labels already handled there.

The regression fixture reproduces the Ansible metadata from the report and checks both the exact author and line range. It also checks that a separate author's own parenthesized website remains part of that author's detection. The original attached PKG-INFO was checked separately: the first author now ends at line 5, and the author on line 134 is unchanged.

Validation on Linux, Python 3.10, after ./configure --dev:

  • New regression fails on the original code and passes after the fix.
  • pytest tests/cluecode/test_copyrights_basic.py -q: 54 passed.
  • pytest tests/cluecode --test-suite=all -n 2 -q: 5,178 passed, 15 expected failures.
  • pytest -n 4 (full standard suite): 3,969 passed, 4 skipped, 4 expected failures.
  • git diff --check passes.

Updated the changelog and contributor list. Windows and macOS tests were not run.

AI assistance: Codex implemented and tested this change.

Tasks

  • Reviewed contribution guidelines
  • Descriptive title and issue reference
  • Local tests pass as detailed above; hosted checks pending
  • Unique feature branch
  • Updated CHANGELOG.rst

Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
@Shubham-Padkonde

Copy link
Copy Markdown
Author

I investigated the new Azure failure in build 19408, Python 3.14 misc_and_scancode.

The three failing TestInterrupt.test_interruptible_* tests all stop in signal.signal(SIGALRM, handler) with ValueError: signal only works in main thread of the main interpreter, before invoking their test callable. The no-multiprocess ignore-files test reports the same failure. src/scancode/interrupt.py and its tests are unchanged between base 384b62a and this PR's 22b6e161.

I have not reproduced the CI failure locally: the four original interruption tests pass under Python 3.10 with three xdist workers. A separate focused check of normal return, exception handling, and timeout using the exact base and PR interruption source also passes all six cases under Python 3.14.7, pytest 9.0.3, xdist 2.5.0, and execnet 1.9.0, both serially and with three workers. This does not reproduce the full CI job's test ordering/environment.

This appears separate from the PKG-INFO copyright-detection change. Could a maintainer rerun the failed job to check whether it persists? I have left the unrelated signal/runner code unchanged. Investigation and this comment were prepared with Codex assistance.

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.

Too much data included in author detected in ansible-core/PKG-INFO

1 participant